Skip to content

Commit

Permalink
chore: update Node.js version in CI and pin dependencies (#32)
Browse files Browse the repository at this point in the history
* 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
carpasse authored Apr 7, 2024
1 parent 454ceb6 commit 63f4e26
Showing 1 changed file with 42 additions and 10 deletions.
52 changes: 42 additions & 10 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:

jobs:
test:
runs-on: ubuntu-latest
runs-on: ubuntu-20.04
strategy:
matrix:
name:
Expand All @@ -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
Expand Down Expand Up @@ -73,32 +79,49 @@ jobs:

- name: Node.js 8.x
node-version: "8.17"
npm-i: mocha@7.2.0
npm-i: mocha@7.2.0 nyc@14.1.1

- name: Node.js 9.x
node-version: "9.11"
npm-i: mocha@7.2.0
npm-i: mocha@7.2.0 nyc@14.1.1

- name: Node.js 10.x
node-version: "10.23"
node-version: "10.24"
npm-i: mocha@8.4.0

- name: Node.js 11.x
node-version: "11.15"
npm-i: mocha@8.4.0

- 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
Expand All @@ -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
Expand Down Expand Up @@ -180,3 +211,4 @@ jobs:
with:
github-token: ${{ secrets.github_token }}
parallel-finished: true

0 comments on commit 63f4e26

Please sign in to comment.