-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
264 lines (208 loc) · 6.31 KB
/
Copy pathci.yml
File metadata and controls
264 lines (208 loc) · 6.31 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
name: ci
on:
push:
branches:
- main
pull_request:
permissions:
contents: read
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Install Node.js
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
with:
node-version: lts/*
- name: Install Node.js dependencies
run: npm install
- name: Lint code
run: npm run lint
test:
permissions:
checks: write # for coverallsapp/github-action to create new checks
contents: read # for actions/checkout to fetch code
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os:
- ubuntu-latest
- windows-latest
name:
- Node.js 10.x
- Node.js 11.x
- Node.js 12.x
- 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
- Node.js 22.x
- Node.js 23.x
- Node.js 24.x
- Node.js 25.x
- Node.js 26.x
include:
- name: Node.js 10.x
node-version: "10.16.0"
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.0.0"
npm-i: mocha@9.2.2
- name: Node.js 13.x
node-version: "13.14"
npm-i: mocha@9.2.2
- name: Node.js 14.x
node-version: "14.0.0"
npm-i: mocha@9.2.2
- name: Node.js 15.x
node-version: "15.0.0"
npm-i: mocha@9.2.2
- name: Node.js 16.x
node-version: "16.0.0"
- name: Node.js 17.x
node-version: "17.0.0"
- name: Node.js 18.x
node-version: "18.0.0"
- name: Node.js 19.x
node-version: "19.0.0"
- name: Node.js 20.x
node-version: "20.0.0"
- name: Node.js 21.x
node-version: "21"
- name: Node.js 22.x
node-version: "22"
- name: Node.js 23.x
node-version: "23"
- name: Node.js 24.x
node-version: "24"
- name: Node.js 25.x
node-version: "25"
- name: Node.js 26.x
node-version: "26"
# Windows on Node.js < 22 is not yet stable in the test suite;
# keep those legs informational until it is.
- name: Node.js 10.x
os: windows-latest
experimental: true
- name: Node.js 11.x
os: windows-latest
experimental: true
- name: Node.js 12.x
os: windows-latest
experimental: true
- name: Node.js 13.x
os: windows-latest
experimental: true
- name: Node.js 14.x
os: windows-latest
experimental: true
- name: Node.js 15.x
os: windows-latest
experimental: true
- name: Node.js 16.x
os: windows-latest
experimental: true
- name: Node.js 17.x
os: windows-latest
experimental: true
- name: Node.js 18.x
os: windows-latest
experimental: true
- name: Node.js 19.x
os: windows-latest
experimental: true
- name: Node.js 20.x
os: windows-latest
experimental: true
- name: Node.js 21.x
os: windows-latest
experimental: true
# macOS legs come from `include`, scoped to versions that can run on
# the macOS runners: Node.js < 16 has no darwin-arm64 builds (setup-node
# cannot install them natively and those legs would be permanently
# red), so they are skipped. 16.x-21.x run as x64 under Rosetta;
# informational until measured, mirroring the Windows < 22 treatment.
- name: Node.js 16.x
os: macos-latest
experimental: true
- name: Node.js 17.x
os: macos-latest
experimental: true
- name: Node.js 18.x
os: macos-latest
experimental: true
- name: Node.js 19.x
os: macos-latest
experimental: true
- name: Node.js 20.x
os: macos-latest
experimental: true
- name: Node.js 21.x
os: macos-latest
experimental: true
- name: Node.js 22.x
os: macos-latest
- name: Node.js 23.x
os: macos-latest
- name: Node.js 24.x
os: macos-latest
- name: Node.js 25.x
os: macos-latest
- name: Node.js 26.x
os: macos-latest
continue-on-error: ${{ matrix.experimental == true }}
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Install Node.js ${{ matrix.node-version }}
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
with:
node-version: ${{ matrix.node-version }}
- name: Remove npm module(s) ${{ matrix.npm-rm }}
run: npm rm --silent --save-dev ${{ matrix.npm-rm }}
if: matrix.npm-rm != ''
- name: Install npm module(s) ${{ matrix.npm-i }}
run: npm install --save-dev ${{ matrix.npm-i }}
if: matrix.npm-i != ''
- name: Install Node.js dependencies
run: npm install
- name: List environment
shell: bash
run: |
echo "node@$(node -v)"
echo "npm@$(npm -v)"
npm -s ls ||:
- name: Run tests
shell: bash
run: npm run test-ci
- name: Collect code coverage
uses: coverallsapp/github-action@8d6379e14d29928660c4ba802d8e85393440b329 # v2.3.8
if: matrix.os == 'ubuntu-latest'
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
flag-name: run-${{ matrix.name }}
parallel: true
coverage:
permissions:
checks: write # for coverallsapp/github-action to create new checks
needs: test
runs-on: ubuntu-latest
steps:
- name: Upload code coverage
uses: coverallsapp/github-action@8d6379e14d29928660c4ba802d8e85393440b329 # v2.3.8
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
parallel-finished: true