1
1
name : ci
2
2
3
3
on :
4
- - pull_request
5
- - push
4
+ push :
5
+ branches :
6
+ - master
7
+ - ' 2.x'
8
+ paths-ignore :
9
+ - ' *.md'
10
+ pull_request :
11
+ paths-ignore :
12
+ - ' *.md'
6
13
7
14
jobs :
8
15
test :
9
16
runs-on : ubuntu-20.04
10
17
strategy :
11
18
matrix :
12
19
name :
13
- - Node.js 0.8
14
- - Node.js 0.10
15
- - Node.js 0.12
16
- - io.js 1.x
17
- - io.js 2.x
18
- - io.js 3.x
19
- - Node.js 4.x
20
- - Node.js 5.x
21
- - Node.js 6.x
22
- - Node.js 7.x
23
- - Node.js 8.x
24
- - Node.js 9.x
25
- - Node.js 10.x
26
- - Node.js 11.x
27
- - 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
20
- Node.js 18.x
34
21
- Node.js 19.x
35
22
- Node.js 20.x
36
23
- Node.js 21.x
24
+ - Node.js 22.x
37
25
38
26
include :
39
- - name : Node.js 0.8
40
- node-version : " 0.8"
41
- npm-i : mocha@2.5.3
42
- npm-rm : nyc
43
-
44
- - name : Node.js 0.10
45
- node-version : " 0.10"
46
- npm-i : mocha@3.5.3 nyc@10.3.2
47
-
48
- - name : Node.js 0.12
49
- node-version : " 0.12"
50
- npm-i : mocha@3.5.3 nyc@10.3.2
51
-
52
- - name : io.js 1.x
53
- node-version : " 1.8"
54
- npm-i : mocha@3.5.3 nyc@10.3.2
55
-
56
- - name : io.js 2.x
57
- node-version : " 2.5"
58
- npm-i : mocha@3.5.3 nyc@10.3.2
59
-
60
- - name : io.js 3.x
61
- node-version : " 3.3"
62
- npm-i : mocha@3.5.3 nyc@10.3.2
63
-
64
- - name : Node.js 4.x
65
- node-version : " 4.9"
66
- npm-i : mocha@5.2.0 nyc@11.9.0
67
-
68
- - name : Node.js 5.x
69
- node-version : " 5.12"
70
- npm-i : mocha@5.2.0 nyc@11.9.0
71
-
72
- - name : Node.js 6.x
73
- node-version : " 6.17"
74
- npm-i : mocha@6.2.3 nyc@14.1.1
75
-
76
- - name : Node.js 7.x
77
- node-version : " 7.10"
78
- npm-i : mocha@6.2.3 nyc@14.1.1
79
-
80
- - name : Node.js 8.x
81
- node-version : " 8.17"
82
- npm-i : mocha@7.2.0 nyc@14.1.1
83
-
84
- - name : Node.js 9.x
85
- node-version : " 9.11"
86
- npm-i : mocha@7.2.0 nyc@14.1.1
87
-
88
- - name : Node.js 10.x
89
- node-version : " 10.24"
90
- npm-i : mocha@8.4.0
91
-
92
- - name : Node.js 11.x
93
- node-version : " 11.15"
94
- npm-i : mocha@8.4.0
95
-
96
- - name : Node.js 12.x
97
- node-version : " 12.22"
98
-
99
- - name : Node.js 13.x
100
- node-version : " 13.14"
101
-
102
- - name : Node.js 14.x
103
- node-version : " 14.19"
104
-
105
- - name : Node.js 15.x
106
- node-version : " 15.14"
107
-
108
- - name : Node.js 16.x
109
- node-version : " 16.13"
110
-
111
- - name : Node.js 17.x
112
- node-version : " 17.4"
113
-
114
27
- name : Node.js 18.x
115
- node-version : " 18.20 "
28
+ node-version : " 18"
116
29
117
30
- name : Node.js 19.x
118
- node-version : " 19.9 "
31
+ node-version : " 19"
119
32
120
33
- name : Node.js 20.x
121
- node-version : " 20.12 "
34
+ node-version : " 20"
122
35
123
36
- name : Node.js 21.x
124
- node-version : " 21.7"
37
+ node-version : " 21"
38
+
39
+ - name : Node.js 22.x
40
+ node-version : " 22"
125
41
126
42
steps :
127
- - uses : actions/checkout@v2
43
+ - uses : actions/checkout@v4
128
44
129
45
- name : Install Node.js ${{ matrix.node-version }}
130
46
shell : bash -eo pipefail -l {0}
131
47
run : |
132
- if [[ "${{ matrix.node-version }}" == 0.6* ]]; then
133
- sudo apt-get install g++-4.8 gcc-4.8 libssl1.0-dev
134
- export CC=/usr/bin/gcc-4.8
135
- export CXX=/usr/bin/g++-4.8
136
- fi
137
48
nvm install --default ${{ matrix.node-version }}
138
- if [[ "${{ matrix.node-version }}" == 0.* && "$(cut -d. -f2 <<< "${{ matrix.node-version }}")" -lt 10 ]]; then
139
- nvm install --alias=npm 0.10
140
- nvm use ${{ matrix.node-version }}
141
- if [[ "$(npm -v)" == 1.1.* ]]; then
142
- nvm exec npm npm install -g npm@1.1
143
- ln -fs "$(which npm)" "$(dirname "$(nvm which npm)")/npm"
144
- else
145
- sed -i '1s;^.*$;'"$(printf '#!%q' "$(nvm which npm)")"';' "$(readlink -f "$(which npm)")"
146
- fi
147
- npm config set strict-ssl false
148
- fi
149
49
dirname "$(nvm which ${{ matrix.node-version }})" >> "$GITHUB_PATH"
150
50
151
51
- name : Configure npm
@@ -156,29 +56,6 @@ jobs:
156
56
npm config set shrinkwrap false
157
57
fi
158
58
159
- - name : Remove non-test npm modules
160
- run : npm rm --silent --save-dev csv-parse raw-body stream-to-array
161
-
162
- - name : Remove npm module(s) ${{ matrix.npm-rm }}
163
- run : npm rm --silent --save-dev ${{ matrix.npm-rm }}
164
- if : matrix.npm-rm != ''
165
-
166
- - name : Install npm module(s) ${{ matrix.npm-i }}
167
- run : npm install --save-dev ${{ matrix.npm-i }}
168
- if : matrix.npm-i != ''
169
-
170
- - name : Setup Node.js version-specific dependencies
171
- shell : bash
172
- run : |
173
- # eslint for linting
174
- # - remove on Node.js < 10
175
- if [[ "$(cut -d. -f1 <<< "${{ matrix.node-version }}")" -lt 10 ]]; then
176
- node -pe 'Object.keys(require("./package").devDependencies).join("\n")' | \
177
- grep -E '^eslint(-|$)' | \
178
- sort -r | \
179
- xargs -n1 npm rm --silent --save-dev
180
- fi
181
-
182
59
- name : Install Node.js dependencies
183
60
run : npm install
184
61
0 commit comments