From 80a003fc5fed95b5dc1b8472ac1aa34f67cb5447 Mon Sep 17 00:00:00 2001 From: Thomas Schuetz Date: Wed, 15 Mar 2023 08:57:10 +0100 Subject: [PATCH] feat: add automatic tests of scenarios Signed-off-by: Thomas Schuetz --- .github/workflows/test.yaml | 45 +++++++++++++++++++++++++++++++++++++ Makefile | 3 +++ 2 files changed, 48 insertions(+) create mode 100644 .github/workflows/test.yaml create mode 100644 Makefile diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml new file mode 100644 index 0000000..00ec031 --- /dev/null +++ b/.github/workflows/test.yaml @@ -0,0 +1,45 @@ +name: Test Scenarios +on: + push: + branches: + - 'main' + - '[0-9]+.[1-9][0-9]*.x' + 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: + - name: Checkout + uses: actions/checkout@v2 + with: + fetch-depth: 0 + + - name: "Create kind Cluster" + uses: helm/kind-action@v1.5.0 + + - 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: Run Tests + working-directory: . + run: make test \ No newline at end of file diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..2a3c078 --- /dev/null +++ b/Makefile @@ -0,0 +1,3 @@ +.PHONY: test +test: + find . -not -path '*/.*' -type d -depth 1 | xargs make -C {} test