Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci(workflow): fix test workflow to assure it is not skipped if test_matrix fails #84

Merged
merged 2 commits into from
Sep 6, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 9 additions & 7 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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() }}