Skip to content

Commit

Permalink
Running tests in paralles with a matrix strategy
Browse files Browse the repository at this point in the history
Signed-off-by: Itay Grudev <[email protected]>
  • Loading branch information
itay-grudev committed Sep 9, 2024
1 parent 7fa44fe commit 97b873c
Showing 1 changed file with 17 additions and 2 deletions.
19 changes: 17 additions & 2 deletions .github/workflows/tests-cluster-chainsaw.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,23 @@ on:
- 'gh-pages'

jobs:
test-cluster-standalone:
test-list:
runs-on: ubuntu-22.04
outputs:
tests: ${{ steps.listTests.outputs.tests }}
steps:
- name: Checkout
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
with:
fetch-depth: 1
- id: listTests
run: |
echo "tests=$(ls charts/cluster/test -1 | jq -cRn '{ include: [inputs | { test: "\(.)" }]}')" >> $GITHUB_OUTPUT
test:
needs: test-list
runs-on: ubuntu-22.04
strategy:
matrix: ${{ fromJson(needs.test-list.outputs.tests) }}
steps:
- name: Checkout
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
Expand Down Expand Up @@ -46,4 +61,4 @@ jobs:
tenant minio-operator/tenant
- name: Run Kyverno/Chainsaw
run: chainsaw test
run: chainsaw test charts/cluster/test/${{matrix.test}}

0 comments on commit 97b873c

Please sign in to comment.