Skip to content

Commit de6c2ad

Browse files
committed
ci: add node matrix
1 parent 15de413 commit de6c2ad

1 file changed

Lines changed: 13 additions & 2 deletions

File tree

.github/workflows/run-tests.yml

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ on:
1010

1111
jobs:
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
@@ -19,6 +19,10 @@ jobs:
1919
- ubuntu-latest
2020
- windows-latest
2121
- macos-latest
22+
node:
23+
- 20
24+
- 22
25+
- 24
2226
steps:
2327
- name: Check out repository
2428
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
@@ -29,7 +33,7 @@ jobs:
2933
uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0
3034
with:
3135
cache: npm
32-
node-version-file: '.nvmrc'
36+
node-version: ${{ matrix.node }}
3337

3438
- name: Install dependencies
3539
run: npm ci
@@ -40,3 +44,10 @@ jobs:
4044

4145
- name: Run tests
4246
run: npm run test
47+
48+
# Gating job for branch protection.
49+
test-success:
50+
runs-on: ubuntu-latest
51+
needs: run-tests
52+
steps:
53+
- run: echo done

0 commit comments

Comments
 (0)