ci(matrix): prevent skipping the test job when test_matrix fails

for #semantic-release/.github#19
This commit is contained in:
Matt Travi 2023-09-17 08:58:53 -05:00
parent 11788ed5dc
commit 87f0c12cf6
No known key found for this signature in database
GPG Key ID: 8C173646C24FED70

View File

@ -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