Skip to content

Commit 1a65b3a

Browse files
authored
build: update Node.js versions and pin dependencies (#20)
* PR: #20 * pin nyc versions for node 8 & 9 and fix npm config * remove node version 0.6 from ci gh action. It won't build on ubuntu 20 * add missing node versions to ci action
1 parent 89b6101 commit 1a65b3a

File tree

1 file changed

+33
-15
lines changed

1 file changed

+33
-15
lines changed

.github/workflows/ci.yml

+33-15
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,10 @@ on:
66

77
jobs:
88
test:
9-
runs-on: ubuntu-18.04
9+
runs-on: ubuntu-20.04
1010
strategy:
1111
matrix:
1212
name:
13-
- Node.js 0.6
1413
- Node.js 0.8
1514
- Node.js 0.10
1615
- Node.js 0.12
@@ -31,13 +30,12 @@ jobs:
3130
- Node.js 15.x
3231
- Node.js 16.x
3332
- Node.js 17.x
33+
- Node.js 18.x
34+
- Node.js 19.x
35+
- Node.js 20.x
36+
- Node.js 21.x
3437

3538
include:
36-
- name: Node.js 0.6
37-
node-version: "0.6"
38-
npm-i: mocha@1.21.5
39-
npm-rm: nyc
40-
4139
- name: Node.js 0.8
4240
node-version: "0.8"
4341
npm-i: mocha@2.5.3
@@ -73,19 +71,19 @@ jobs:
7371

7472
- name: Node.js 6.x
7573
node-version: "6.17"
76-
npm-i: mocha@6.2.2 nyc@14.1.1
74+
npm-i: mocha@6.2.3 nyc@14.1.1
7775

7876
- name: Node.js 7.x
7977
node-version: "7.10"
80-
npm-i: mocha@6.2.2 nyc@14.1.1
78+
npm-i: mocha@6.2.3 nyc@14.1.1
8179

8280
- name: Node.js 8.x
8381
node-version: "8.17"
84-
npm-i: mocha@7.2.0
82+
npm-i: mocha@7.2.0 nyc@14.1.1
8583

8684
- name: Node.js 9.x
8785
node-version: "9.11"
88-
npm-i: mocha@7.2.0
86+
npm-i: mocha@7.2.0 nyc@14.1.1
8987

9088
- name: Node.js 10.x
9189
node-version: "10.24"
@@ -108,11 +106,23 @@ jobs:
108106
node-version: "15.14"
109107

110108
- name: Node.js 16.x
111-
node-version: "16.14"
109+
node-version: "16.13"
112110

113111
- name: Node.js 17.x
114112
node-version: "17.4"
115113

114+
- name: Node.js 18.x
115+
node-version: "18.20"
116+
117+
- name: Node.js 19.x
118+
node-version: "19.9"
119+
120+
- name: Node.js 20.x
121+
node-version: "20.12"
122+
123+
- name: Node.js 21.x
124+
node-version: "21.7"
125+
116126
steps:
117127
- uses: actions/checkout@v2
118128

@@ -139,7 +149,15 @@ jobs:
139149
dirname "$(nvm which ${{ matrix.node-version }})" >> "$GITHUB_PATH"
140150
141151
- name: Configure npm
142-
run: npm config set shrinkwrap false
152+
run: |
153+
if [[ "$(npm config get package-lock)" == "true" ]]; then
154+
npm config set package-lock false
155+
else
156+
npm config set shrinkwrap false
157+
fi
158+
159+
- name: Remove non-test npm modules
160+
run: npm rm --silent --save-dev csv-parse raw-body stream-to-array
143161

144162
- name: Remove npm module(s) ${{ matrix.npm-rm }}
145163
run: npm rm --silent --save-dev ${{ matrix.npm-rm }}
@@ -190,7 +208,7 @@ jobs:
190208
uses: coverallsapp/github-action@master
191209
if: steps.list_env.outputs.nyc != ''
192210
with:
193-
github-token: ${{ secrets.github_token }}
211+
github-token: ${{ secrets.GITHUB_TOKEN }}
194212
flag-name: run-${{ matrix.test_number }}
195213
parallel: true
196214

@@ -201,5 +219,5 @@ jobs:
201219
- name: Upload code coverage
202220
uses: coverallsapp/github-action@master
203221
with:
204-
github-token: ${{ secrets.github_token }}
222+
github-token: ${{ secrets.GITHUB_TOKEN }}
205223
parallel-finished: true

0 commit comments

Comments
 (0)