diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 9344b0876..84dacfef7 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() }}