Skip to content

Commit e7072b7

Browse files
ci: add node 19, 20, 21 and 22 versions (#15)
PR-URL: #15 Main changes: * ci: add node 19, 20, 21 and 22 to the ci * ci: fix configure npm step * ci: fix nyc version for node 8 and 9
1 parent 2d8ecd2 commit e7072b7

1 file changed

Lines changed: 26 additions & 5 deletions

File tree

.github/workflows/ci.yml

Lines changed: 26 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,10 @@ jobs:
3131
- Node.js 16.x
3232
- Node.js 17.x
3333
- Node.js 18.x
34+
- Node.js 19.x
35+
- Node.js 20.x
36+
- Node.js 21.x
37+
- Node.js 22.x
3438

3539
include:
3640
- name: Node.js 0.8
@@ -85,12 +89,12 @@ jobs:
8589

8690
- name: Node.js 8.x
8791
node-version: "8.17"
88-
npm-i: mocha@7.2.0
92+
npm-i: mocha@7.2.0 nyc@14.1.1
8993
npm-rm: beautify-benchmark benchmark fast-url-parser
9094

9195
- name: Node.js 9.x
9296
node-version: "9.11"
93-
npm-i: mocha@7.2.0
97+
npm-i: mocha@7.2.0 nyc@14.1.1
9498
npm-rm: beautify-benchmark benchmark fast-url-parser
9599

96100
- name: Node.js 10.x
@@ -133,8 +137,20 @@ jobs:
133137
node-version: "18.13"
134138
npm-rm: beautify-benchmark benchmark fast-url-parser
135139

140+
- name: Node.js 19.x
141+
node-version: "19.6"
142+
143+
- name: Node.js 20.x
144+
node-version: "20.12"
145+
146+
- name: Node.js 21.x
147+
node-version: "21.7"
148+
149+
- name: Node.js 22.x
150+
node-version: "22.0"
151+
136152
steps:
137-
- uses: actions/checkout@v2
153+
- uses: actions/checkout@v4
138154

139155
- name: Install Node.js ${{ matrix.node-version }}
140156
shell: bash -eo pipefail -l {0}
@@ -149,7 +165,12 @@ jobs:
149165
dirname "$(nvm which ${{ matrix.node-version }})" >> "$GITHUB_PATH"
150166
151167
- name: Configure npm
152-
run: npm config set shrinkwrap false
168+
run: |
169+
if [[ "$(npm config get package-lock)" == "true" ]]; then
170+
npm config set package-lock false
171+
else
172+
npm config set shrinkwrap false
173+
fi
153174
154175
- name: Remove npm module(s) ${{ matrix.npm-rm }}
155176
run: npm rm --silent --save-dev ${{ matrix.npm-rm }}
@@ -208,7 +229,7 @@ jobs:
208229
needs: test
209230
runs-on: ubuntu-latest
210231
steps:
211-
- name: Uploade code coverage
232+
- name: Upload code coverage
212233
uses: coverallsapp/github-action@master
213234
with:
214235
github-token: ${{ secrets.github_token }}

0 commit comments

Comments
 (0)