Skip to content

chore: add first e2e tests #4

chore: add first e2e tests

chore: add first e2e tests #4

Workflow file for this run

name: Test Scenarios
on:
push:
branches:
- 'main'
- '[0-9]+.[1-9][0-9]*.x'
- 'feat/add_tests'
pull_request:
branches:
- 'main'
- '[0-9]+.[1-9][0-9]*.x'
- 'epic/*'
paths-ignore:
- "docs/**"
- "**.md"
- "netlify.toml"
env:
# renovate: datasource=github-tags depName=kudobuilder/kuttl
KUTTL_VERSION: "v0.15.0"
defaults:
run:
shell: bash
jobs:
run-scenarios:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3
with:
fetch-depth: 0
- name: Set up Helm
uses: azure/setup-helm@5119fcb9089d432beecbf79bb2c7915207344b78 # v3
with:
version: v3.11.
- uses: actions/setup-python@57ded4d7d5e986d7296eab16560982c6dd7c923b # v4
with:
python-version: '3.9'
check-latest: tru
- name: Download KUTTL
run: |
curl -fL https://github.com/kudobuilder/kuttl/releases/download/${{ env.KUTTL_VERSION }}/kubectl-kuttl_${KUTTL_VERSION#v}_linux_x86_64 -o kubectl-kuttl
chmod +x kubectl-kuttl
mv kubectl-kuttl /usr/local/bin
- name: Set up chart-testing
uses: helm/chart-testing-action@e8788873172cb653a90ca2e819d79d65a66d4e76 # v2.4.0
- name: Run chart-testing (list-changed)
id: list-changed
run: |
changed=$(ct list-changed --chart-dirs chart --target-branch ${{ github.event.repository.default_branch }})
if [[ -n "$changed" ]]; then
echo "changed=true" >> "$GITHUB_OUTPUT"
fi
- name: Run chart-testing (lint)
if: steps.list-changed.outputs.changed == 'true'
run: ct lint --validate-maintainers=false --check-version-increment=false --chart-dirs chart --target-branch ${{ github.event.repository.default_branch }}
- name: Create kind cluster
if: steps.list-changed.outputs.changed == 'true'
uses: helm/kind-action@d8ccf8fb623ce1bb360ae2f45f323d9d5c5e9f00 # v1.5.0
- name: Run chart-testing (install)
if: steps.list-changed.outputs.changed == 'true'
run: ct install --chart-dirs chart --skip-clean-up --target-branch ${{ github.event.repository.default_branch }}
- name: Run Tests
working-directory: e2e
run: make test