Skip to content

Commit d4969fb

Browse files
committed
chore(CI): simplify testing strategy
1 parent e8eabf4 commit d4969fb

File tree

1 file changed

+53
-10
lines changed

1 file changed

+53
-10
lines changed

.github/workflows/CI.yml

Lines changed: 53 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,75 @@
11
name: CI
22
on:
3-
push: {}
4-
pull_request: {}
3+
push:
4+
pull_request:
5+
56
jobs:
6-
main:
7+
lint:
8+
name: ⬣ Lint
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: 🛑 Cancel Previous Runs
12+
uses: styfle/[email protected]
13+
14+
- name: ⬇️ Checkout repo
15+
uses: actions/checkout@v3
16+
17+
- name: ⎔ Setup Node
18+
uses: actions/setup-node@v3
19+
with:
20+
node-version: 18
21+
22+
- name: 📥 Install dependencies
23+
run: npm install
24+
25+
- name: ▶️ Run lint script
26+
run: npm run lint
27+
28+
test:
29+
name: 🧪 Test (Node@${{ matrix.node }} - ESLint@${{ matrix.eslint }} - ${{ matrix.os }})
730
strategy:
831
matrix:
9-
eslint: [7, 8]
10-
node: [12.22.0, 12, 14.17.0, 14, 16, 18]
11-
runs-on: ubuntu-latest
32+
eslint: [8]
33+
node: [12.22.0, 12, 14.17.0, 14, 16.0.0, 16, 18]
34+
os: [ubuntu-latest]
35+
include:
36+
# On other platforms
37+
- os: windows-latest
38+
eslint: 8
39+
node: 18
40+
- os: macos-latest
41+
eslint: 8
42+
node: 18
43+
# On old ESLint versions
44+
- eslint: 7
45+
node: 18
46+
os: ubuntu-latest
47+
# On the minimum supported ESLint/Node.js version
48+
- eslint: 7.0.0
49+
node: 12.22.0
50+
os: ubuntu-latest
51+
runs-on: ${{ matrix.os }}
1252
steps:
1353
- name: 🛑 Cancel Previous Runs
14-
uses: styfle/cancel-workflow-action@0.10.1
54+
uses: styfle/cancel-workflow-action@0.11.0
1555

1656
- name: ⬇️ Checkout repo
1757
uses: actions/checkout@v3
1858

19-
- name: ⎔ Setup node
59+
- name: ⎔ Setup Node v${{ matrix.node }}
2060
uses: actions/setup-node@v3
2161
with:
22-
node-version: ${{ matrix.node }}
2362
cache: npm
63+
node-version: ${{ matrix.node }}
2464

25-
- name: 📥 Download deps
65+
- name: 📥 Install dependencies
2666
run: npm ci
2767

2868
- name: 📥 Install ESLint v${{ matrix.eslint }}
2969
run: npm install eslint@${{ matrix.eslint }}
3070

3171
- name: ▶️ Run test script
3272
run: npm run test -- --runInBand
73+
74+
- name: ⬆️ Upload coverage report
75+
uses: codecov/codecov-action@v3

0 commit comments

Comments
 (0)