Skip to content

Commit 50250ef

Browse files
authored
ci: Add Node.js versions and pin dependencies in the pipeline (#26)
PR-URL: #26
1 parent 5fe137d commit 50250ef

File tree

1 file changed

+59
-16
lines changed

1 file changed

+59
-16
lines changed

.github/workflows/ci.yml

+59-16
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-latest
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
@@ -26,12 +25,18 @@ jobs:
2625
- Node.js 10.x
2726
- Node.js 11.x
2827
- Node.js 12.x
28+
- Node.js 13.x
29+
- Node.js 14.x
30+
- Node.js 15.x
31+
- Node.js 16.x
32+
- Node.js 17.x
33+
- Node.js 18.x
34+
- Node.js 19.x
35+
- Node.js 20.x
36+
- Node.js 21.x
37+
- Node.js 22.x
2938

3039
include:
31-
- name: Node.js 0.6
32-
node-version: "0.6"
33-
34-
npm-rm: nyc
3540

3641
- name: Node.js 0.8
3742
node-version: "0.8"
@@ -68,36 +73,69 @@ jobs:
6873

6974
- name: Node.js 6.x
7075
node-version: "6.17"
76+
7177

7278
- name: Node.js 7.x
7379
node-version: "7.10"
80+
7481

7582
- name: Node.js 8.x
76-
node-version: "8.16"
83+
node-version: "8.17"
84+
7785

7886
- name: Node.js 9.x
7987
node-version: "9.11"
88+
8089

8190
- name: Node.js 10.x
82-
node-version: "10.15"
91+
node-version: "10.24"
92+
8393

8494
- name: Node.js 11.x
8595
node-version: "11.15"
96+
8697

8798
- name: Node.js 12.x
88-
node-version: "12.2"
99+
node-version: "12.22"
100+
101+
102+
- name: Node.js 13.x
103+
node-version: "13.14"
104+
105+
106+
- name: Node.js 14.x
107+
node-version: "14.21"
108+
109+
- name: Node.js 15.x
110+
node-version: "15.14"
111+
112+
- name: Node.js 16.x
113+
node-version: "16.20"
114+
115+
- name: Node.js 17.x
116+
node-version: "17.9"
117+
118+
- name: Node.js 18.x
119+
node-version: "18.18"
120+
121+
- name: Node.js 19.x
122+
node-version: "19.9"
123+
124+
- name: Node.js 20.x
125+
node-version: "20.9"
126+
127+
- name: Node.js 21.x
128+
node-version: "21.7"
129+
130+
- name: Node.js 22.x
131+
node-version: "22.0"
89132

90133
steps:
91-
- uses: actions/checkout@v2
134+
- uses: actions/checkout@v4
92135

93136
- name: Install Node.js ${{ matrix.node-version }}
94137
shell: bash -eo pipefail -l {0}
95138
run: |
96-
if [[ "${{ matrix.node-version }}" == 0.6* ]]; then
97-
sudo apt-get install g++-4.8 gcc-4.8 libssl1.0-dev
98-
export CC=/usr/bin/gcc-4.8
99-
export CXX=/usr/bin/g++-4.8
100-
fi
101139
nvm install --default ${{ matrix.node-version }}
102140
if [[ "${{ matrix.node-version }}" == 0.* && "$(cut -d. -f2 <<< "${{ matrix.node-version }}")" -lt 10 ]]; then
103141
nvm install --alias=npm 0.10
@@ -113,7 +151,12 @@ jobs:
113151
dirname "$(nvm which ${{ matrix.node-version }})" >> "$GITHUB_PATH"
114152
115153
- name: Configure npm
116-
run: npm config set shrinkwrap false
154+
run: |
155+
if [[ "$(npm config get package-lock)" == "true" ]]; then
156+
npm config set package-lock false
157+
else
158+
npm config set shrinkwrap false
159+
fi
117160
118161
- name: Remove npm module(s) ${{ matrix.npm-rm }}
119162
run: npm rm --silent --save-dev ${{ matrix.npm-rm }}

0 commit comments

Comments
 (0)