-
Notifications
You must be signed in to change notification settings - Fork 39
43 lines (39 loc) · 1.02 KB
/
test.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
## Test with multiple node versions.
name: test
on:
push:
branches:
- main
pull_request:
branches:
- main
permissions:
contents: read
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 18
- run: utils/run-install.sh
- run: utils/run-lint.sh
test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
node-version: [10, 12, 14, 16, 18, 20, 22]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- name: Update npm to at least v7 for workspaces support
if: ${{ matrix.node-version < 16 }} # node@16 comes with npm@8, node@14 with npm@6
run: npm install -g npm@7 # npm@7 supports node >=10
- name: Install dependencies
run: utils/run-install.sh
- name: Test Node.js v${{ matrix.node-version }}
run: utils/run-test.sh