From 87f0c12cf65c5109e68ea4a4d8cd513e3e56dae2 Mon Sep 17 00:00:00 2001 From: Matt Travi Date: Sun, 17 Sep 2023 08:58:53 -0500 Subject: [PATCH] ci(matrix): prevent skipping the test job when test_matrix fails for #semantic-release/.github#19 --- .github/workflows/test.yml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index ca581a82..9e03614e 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -15,6 +15,10 @@ on: permissions: contents: read # to fetch code (actions/checkout) +env: + FORCE_COLOR: 1 + NPM_CONFIG_COLOR: always + jobs: test_matrix: strategy: @@ -46,6 +50,7 @@ jobs: test: runs-on: ubuntu-latest needs: test_matrix + if: always() steps: - uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4 - uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d # v3 @@ -55,3 +60,9 @@ jobs: - run: npm clean-install - run: npm audit signatures - run: npm run lint + - name: All matrix versions passed + if: ${{ !(contains(needs.*.result, 'failure')) }} + run: exit 0 + - name: Some matrix version failed + if: ${{ contains(needs.*.result, 'failure') }} + run: exit 1