Skip to content

Commit a89f714

Browse files
authored
Fix broken Github action on Node 14.x (#1904)
1 parent de17dc0 commit a89f714

File tree

1 file changed

+34
-25
lines changed

1 file changed

+34
-25
lines changed

.github/workflows/nodejs.yml

Lines changed: 34 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
---
12
name: Node CI
23

34
on: [push, pull_request]
@@ -8,29 +9,37 @@ jobs:
89
runs-on: ${{ matrix.os }}
910

1011
strategy:
12+
fail-fast: false
1113
matrix:
1214
node-version: [14.x, 16.x, 18.x, 20.x]
1315
os: [ubuntu-latest, windows-latest, macOS-latest]
1416

1517
steps:
16-
- uses: actions/checkout@v3
18+
- uses: actions/checkout@v3
1719

18-
- name: Use Node.js ${{ matrix.node-version }}
19-
uses: actions/setup-node@v3
20-
with:
21-
node-version: ${{ matrix.node-version }}
20+
- name: Use Node.js ${{ matrix.node-version }}
21+
uses: actions/setup-node@v3
22+
with:
23+
node-version: ${{ matrix.node-version }}
2224

23-
- name: Install
24-
run: |
25-
npm install
25+
# workaround for failing tests on Node.js 14.x
26+
# see https://github.com/actions/setup-node/issues/411
27+
- name: Force install specific npm version
28+
run: |
29+
npm install --global [email protected]
30+
npm install --global [email protected]
2631
27-
- name: Lint
28-
run: |
29-
npm run lint
32+
- name: Install
33+
run: |
34+
npm install
3035
31-
- name: Unit test
32-
run: |
33-
npm run test:unit
36+
- name: Lint
37+
run: |
38+
npm run lint
39+
40+
- name: Unit test
41+
run: |
42+
npm run test:unit
3443
3544
license:
3645
name: License check
@@ -41,17 +50,17 @@ jobs:
4150
node-version: [20.x]
4251

4352
steps:
44-
- uses: actions/checkout@v3
53+
- uses: actions/checkout@v3
4554

46-
- name: Use Node.js ${{ matrix.node-version }}
47-
uses: actions/setup-node@v3
48-
with:
49-
node-version: ${{ matrix.node-version }}
55+
- name: Use Node.js ${{ matrix.node-version }}
56+
uses: actions/setup-node@v3
57+
with:
58+
node-version: ${{ matrix.node-version }}
5059

51-
- name: Install
52-
run: |
53-
npm install
60+
- name: Install
61+
run: |
62+
npm install
5463
55-
- name: License checker
56-
run: |
57-
npm run license-checker
64+
- name: License checker
65+
run: |
66+
npm run license-checker

0 commit comments

Comments
 (0)