From b8ce1d51c42ccfdec5eac6dc6f7fb6535bff6953 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philippe=20No=C3=ABl?= Date: Thu, 14 Nov 2024 10:06:02 -0500 Subject: [PATCH 1/3] Add parallel test execution --- .github/workflows/tests-cluster-chainsaw.yaml | 20 +++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/.github/workflows/tests-cluster-chainsaw.yaml b/.github/workflows/tests-cluster-chainsaw.yaml index f313eaf23..cc6178d08 100644 --- a/.github/workflows/tests-cluster-chainsaw.yaml +++ b/.github/workflows/tests-cluster-chainsaw.yaml @@ -6,8 +6,24 @@ on: - 'gh-pages' jobs: - test-cluster-standalone: + test-list: runs-on: ubuntu-latest + 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-latest + strategy: + matrix: ${{ fromJson(needs.test-list.outputs.tests) }} steps: - name: Checkout uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 @@ -75,7 +91,7 @@ jobs: # The Docker Hub tokens are required for the ParadeDB Enterprise tests - name: Run Kyverno/Chainsaw - run: chainsaw test + run: chainsaw test charts/paradedb/test/${{ matrix.test }} env: PARADEDB_ENTERPRISE_DOCKER_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }} PARADEDB_ENTERPRISE_DOCKER_PAT: ${{ secrets.DOCKERHUB_ACCESS_TOKEN }} From 8483cc0d1773a6e3f2a94a690e2877d90e461c88 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philippe=20No=C3=ABl?= Date: Thu, 14 Nov 2024 10:08:33 -0500 Subject: [PATCH 2/3] Clean up --- .github/workflows/tests-cluster-chainsaw.yaml | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/.github/workflows/tests-cluster-chainsaw.yaml b/.github/workflows/tests-cluster-chainsaw.yaml index cc6178d08..ff0e88827 100644 --- a/.github/workflows/tests-cluster-chainsaw.yaml +++ b/.github/workflows/tests-cluster-chainsaw.yaml @@ -10,11 +10,13 @@ jobs: runs-on: ubuntu-latest outputs: tests: ${{ steps.listTests.outputs.tests }} + steps: - name: Checkout - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 + uses: actions/checkout@v4 with: fetch-depth: 1 + - id: listTests run: | echo "tests=$(ls charts/cluster/test -1 | jq -cRn '{ include: [inputs | { test: "\(.)" }]}')" >> $GITHUB_OUTPUT @@ -24,14 +26,15 @@ jobs: runs-on: ubuntu-latest strategy: matrix: ${{ fromJson(needs.test-list.outputs.tests) }} + steps: - name: Checkout - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + uses: actions/checkout@v4 with: fetch-depth: 0 - name: Install Cosign - uses: sigstore/cosign-installer@dc72c7d5c4d10cd6bcb8cf6e3fd625a9e5e537da # v3.7.0 + uses: sigstore/cosign-installer@v3 # Added by ParadeDB: Authenticate to Docker Hub to avoid rate limits - name: Login to Docker Hub @@ -68,7 +71,7 @@ jobs: helm install prometheus-crds prometheus-community/prometheus-operator-crds - name: Install Chainsaw - uses: kyverno/action-install-chainsaw@d311eacde764f806c9658574ff64c9c3b21f8397 # v0.2.11 + uses: kyverno/action-install-chainsaw@v0.2.11 with: verify: true From b60125c3f65e21c1abbfa6c952d617b03b5bb457 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philippe=20No=C3=ABl?= Date: Thu, 14 Nov 2024 10:11:15 -0500 Subject: [PATCH 3/3] Fix condition --- .github/workflows/tests-cluster-chainsaw.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tests-cluster-chainsaw.yaml b/.github/workflows/tests-cluster-chainsaw.yaml index ff0e88827..478688058 100644 --- a/.github/workflows/tests-cluster-chainsaw.yaml +++ b/.github/workflows/tests-cluster-chainsaw.yaml @@ -19,7 +19,7 @@ jobs: - id: listTests run: | - echo "tests=$(ls charts/cluster/test -1 | jq -cRn '{ include: [inputs | { test: "\(.)" }]}')" >> $GITHUB_OUTPUT + echo "tests=$(ls charts/paradedb/test -1 | jq -cRn '{ include: [inputs | { test: "\(.)" }]}')" >> $GITHUB_OUTPUT test: needs: test-list