From 40c3198d8889859dedb0d5e91e23caea550c130b Mon Sep 17 00:00:00 2001 From: Oscar Dominguez Date: Tue, 6 Sep 2022 09:03:59 +0200 Subject: [PATCH] ci(workflow): fix test workflow to assure it is not skipped if test_matrix fails (#84) --- .github/workflows/test.yml | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 9344b08..84dacfe 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -1,11 +1,12 @@ name: Test -on: +"on": push: branches: - main pull_request: - types: [opened, synchronize] - + types: + - opened + - synchronize jobs: test_matrix: runs-on: ubuntu-latest @@ -15,19 +16,20 @@ jobs: - 14 - 16 - 18 - steps: - - uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # tag=v3 + - uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b - name: Use Node.js ${{ matrix.node_version }} - uses: actions/setup-node@2fddd8803e2f5c9604345a0b591c3020ee971a93 # tag=v3 + uses: actions/setup-node@2fddd8803e2f5c9604345a0b591c3020ee971a93 with: node-version: ${{ matrix.node_version }} cache: npm - run: npm ci - run: npm test - test: runs-on: ubuntu-latest needs: test_matrix steps: + - run: exit 1 + if: ${{ needs.test_matrix.result != 'success' }} - run: echo ok + if: ${{ always() }}