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