Skip to content

Commit

Permalink
Running tests in parallel with a matrix strategy (cloudnative-pg#381)
Browse files Browse the repository at this point in the history
* Running tests in parallel with a matrix strategy

---------

Signed-off-by: Itay Grudev <[email protected]>
Signed-off-by: Itay Grudev <[email protected]>
  • Loading branch information
itay-grudev authored Feb 5, 2025
1 parent 5be3553 commit ae5e37c
Showing 1 changed file with 21 additions and 4 deletions.
25 changes: 21 additions & 4 deletions .github/workflows/tests-cluster-chainsaw.yaml
Original file line number Diff line number Diff line change
@@ -1,13 +1,30 @@
name: tests-cluster-chainsaw
name: test( cluster )

on:
pull_request:
branches-ignore:
- 'gh-pages'

jobs:
test-cluster-standalone:
runs-on: ubuntu-24.04
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:
fail-fast: false
matrix: ${{ fromJson(needs.test-list.outputs.tests) }}
name: ${{matrix.test}}
steps:
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
Expand Down Expand Up @@ -51,4 +68,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 ae5e37c

Please sign in to comment.