Skip to content

Commit c970565

Browse files
chore(CI): simplify testing strategy (#378)
1 parent e8eabf4 commit c970565

File tree

3 files changed

+57
-247
lines changed

3 files changed

+57
-247
lines changed

.github/workflows/CI.yml

Lines changed: 55 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,77 @@
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:
30+
🧪 Test (Node@${{ matrix.node }} - ESLint@${{ matrix.eslint }} - ${{
31+
matrix.os }})
732
strategy:
833
matrix:
9-
eslint: [7, 8]
10-
node: [12.22.0, 12, 14.17.0, 14, 16, 18]
11-
runs-on: ubuntu-latest
34+
eslint: [8]
35+
node: [12.22.0, 12, 14.17.0, 14, 16.0.0, 16, 18]
36+
os: [ubuntu-latest]
37+
include:
38+
# On other platforms
39+
- os: windows-latest
40+
eslint: 8
41+
node: 18
42+
- os: macos-latest
43+
eslint: 8
44+
node: 18
45+
# On old ESLint versions
46+
- eslint: 7
47+
node: 18
48+
os: ubuntu-latest
49+
# On the minimum supported ESLint/Node.js version
50+
- eslint: 7.0.0
51+
node: 12.22.0
52+
os: ubuntu-latest
53+
runs-on: ${{ matrix.os }}
1254
steps:
1355
- name: 🛑 Cancel Previous Runs
14-
uses: styfle/cancel-workflow-action@0.10.1
56+
uses: styfle/cancel-workflow-action@0.11.0
1557

1658
- name: ⬇️ Checkout repo
1759
uses: actions/checkout@v3
1860

19-
- name: ⎔ Setup node
61+
- name: ⎔ Setup Node v${{ matrix.node }}
2062
uses: actions/setup-node@v3
2163
with:
22-
node-version: ${{ matrix.node }}
2364
cache: npm
65+
node-version: ${{ matrix.node }}
2466

25-
- name: 📥 Download deps
67+
- name: 📥 Install dependencies
2668
run: npm ci
2769

2870
- name: 📥 Install ESLint v${{ matrix.eslint }}
2971
run: npm install eslint@${{ matrix.eslint }}
3072

3173
- name: ▶️ Run test script
3274
run: npm run test -- --runInBand
75+
76+
- name: ⬆️ Upload coverage report
77+
uses: codecov/codecov-action@v3

0 commit comments

Comments
 (0)