File tree Expand file tree Collapse file tree 1 file changed +16
-2
lines changed Expand file tree Collapse file tree 1 file changed +16
-2
lines changed Original file line number Diff line number Diff line change 1010
1111jobs :
1212 run-tests :
13- name : Tests on ${{ matrix.os }}
13+ name : Tests on ${{ matrix.os }} with node ${{ matrix.node }}
1414 runs-on : ${{ matrix.os }}
1515 strategy :
1616 fail-fast : false
1919 - ubuntu-latest
2020 - windows-latest
2121 - macos-latest
22+ node :
23+ - 22
24+ - 24
2225 steps :
2326 - name : Check out repository
2427 uses : actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
2932 uses : actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0
3033 with :
3134 cache : npm
32- node-version-file : ' .nvmrc '
35+ node-version : ${{ matrix.node }}
3336
3437 - name : Install dependencies
3538 run : npm ci
4043
4144 - name : Run tests
4245 run : npm run test
46+
47+ # Gating job for branch protection.
48+ test-success :
49+ name : ' [Required] Tests passed'
50+ runs-on : ubuntu-latest
51+ needs : run-tests
52+ if : ${{ !cancelled() }}
53+ steps :
54+ - if : ${{ needs.run-tests.result != 'success' }}
55+ run : ' exit 1'
56+ - run : ' exit 0'
You can’t perform that action at this time.
0 commit comments