-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: update Node.js version in CI and pin dependencies (#32)
* PR: #32 * Ref: Same fix as jshttp/http-errors#109 * Fix pin versions nyc version for testing on node 8 & 9 * fix npm config on ci * add node 16 & 17 to ci tests and update node versions * add missing node versions to ci
- Loading branch information
Showing
1 changed file
with
42 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,7 +6,7 @@ on: | |
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
runs-on: ubuntu-20.04 | ||
strategy: | ||
matrix: | ||
name: | ||
|
@@ -28,6 +28,12 @@ jobs: | |
- Node.js 13.x | ||
- Node.js 14.x | ||
- Node.js 15.x | ||
- Node.js 16.x | ||
- Node.js 17.x | ||
- Node.js 18.x | ||
- Node.js 19.x | ||
- Node.js 20.x | ||
- Node.js 21.x | ||
|
||
include: | ||
- name: Node.js 0.8 | ||
|
@@ -73,32 +79,49 @@ jobs: | |
|
||
- name: Node.js 8.x | ||
node-version: "8.17" | ||
npm-i: [email protected] | ||
npm-i: [email protected] [email protected] | ||
|
||
- name: Node.js 9.x | ||
node-version: "9.11" | ||
npm-i: [email protected] | ||
npm-i: [email protected] [email protected] | ||
|
||
- name: Node.js 10.x | ||
node-version: "10.23" | ||
node-version: "10.24" | ||
npm-i: [email protected] | ||
|
||
- name: Node.js 11.x | ||
node-version: "11.15" | ||
npm-i: [email protected] | ||
|
||
- name: Node.js 12.x | ||
node-version: "12.20" | ||
node-version: "12.22" | ||
|
||
- name: Node.js 13.x | ||
node-version: "13.14" | ||
|
||
- name: Node.js 14.x | ||
node-version: "14.15" | ||
node-version: "14.18" | ||
|
||
- name: Node.js 15.x | ||
node-version: "15.5" | ||
node-version: "15.14" | ||
|
||
- name: Node.js 16.x | ||
node-version: "16.2" | ||
node-version: "16.13" | ||
|
||
- name: Node.js 17.x | ||
node-version: "17.2" | ||
|
||
- name: Node.js 18.x | ||
node-version: "18.20" | ||
|
||
- name: Node.js 19.x | ||
node-version: "19.9" | ||
|
||
- name: Node.js 20.x | ||
node-version: "20.12" | ||
|
||
- name: Node.js 21.x | ||
node-version: "21.7" | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
|
@@ -107,13 +130,21 @@ jobs: | |
shell: bash -eo pipefail -l {0} | ||
run: | | ||
nvm install --default ${{ matrix.node-version }} | ||
if [[ "${{ matrix.node-version }}" == 0.* ]]; then | ||
if [[ "${{ matrix.node-version }}" == 0.* && "$(cut -d. -f2 <<< "${{ matrix.node-version }}")" -lt 10 ]]; then | ||
nvm install --alias=npm 0.10 | ||
nvm use ${{ matrix.node-version }} | ||
sed -i '1s;^.*$;'"$(printf '#!%q' "$(nvm which npm)")"';' "$(readlink -f "$(which npm)")" | ||
npm config set strict-ssl false | ||
fi | ||
dirname "$(nvm which ${{ matrix.node-version }})" >> "$GITHUB_PATH" | ||
- name: Configure npm | ||
run: npm config set shrinkwrap false | ||
run: | | ||
if [[ "$(npm config get package-lock)" == "true" ]]; then | ||
npm config set package-lock false | ||
else | ||
npm config set shrinkwrap false | ||
fi | ||
- name: Remove non-test npm modules | ||
run: npm rm --silent --save-dev csv-parse raw-body stream-to-array | ||
|
@@ -180,3 +211,4 @@ jobs: | |
with: | ||
github-token: ${{ secrets.github_token }} | ||
parallel-finished: true | ||
|