From 32a200b72a301b4960fa9b067a1a8708ad8ab285 Mon Sep 17 00:00:00 2001 From: Marco Ferrari Date: Thu, 4 Jul 2024 22:24:12 +0200 Subject: [PATCH] ci: check for skipped and cancelled matrix jobs (#5840) - Always run the job to check if any job of the test matrix failed. - Check if any job of the test matrix was skipped or cancelled, and not just failed. --- .github/workflows/ci.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8f3ccf71..f83e8638 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -258,6 +258,7 @@ jobs: # having to select each individual job that dynamically add to the test matrix. test-success-placeholder: name: Check if all the tests passed + if: ${{ always() }} runs-on: ubuntu-latest permissions: contents: read @@ -266,10 +267,10 @@ jobs: - test-local-action steps: - name: Test suite success - if: ${{ !(contains(needs.*.result, 'failure')) }} + if: ${{ !(contains(needs.*.result, 'failure')) && !contains(needs.*.result, 'cancelled') && !contains(needs.*.result, 'skipped') }} run: exit 0 - name: Test suite failures - if: ${{ contains(needs.*.result, 'failure') }} + if: ${{ contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled') || contains(needs.*.result, 'skipped') }} run: exit 1 preview-release-notes: