Skip to content

Commit 784c8e4

Browse files
committed
chore(CI): simplify testing strategy
1 parent b1d8da3 commit 784c8e4

File tree

2 files changed

+64
-37
lines changed

2 files changed

+64
-37
lines changed

.github/workflows/main.yml

+63-36
Original file line numberDiff line numberDiff line change
@@ -1,48 +1,75 @@
11
name: CI
2-
32
on:
4-
- push
5-
- pull_request
3+
push:
4+
pull_request:
65

76
jobs:
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+
828
test:
9-
name: Node.js ${{ matrix.node-version }} on ${{ matrix.os }}
10-
runs-on: ${{ matrix.os }}
29+
name: 🧪 Test (Node@${{ matrix.node }} - ESLint@${{ matrix.eslint }} - ${{ matrix.os }})
1130
strategy:
12-
fail-fast: false
1331
matrix:
14-
node-version:
15-
- '18'
16-
- '16'
17-
- '14'
18-
os:
19-
- ubuntu-latest
32+
eslint: [8]
33+
node: [14.17.0, 14, 16.0.0, 16, 18.0.0, 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: 14.17.0
50+
os: ubuntu-latest
51+
runs-on: ${{ matrix.os }}
2052
steps:
21-
- uses: actions/checkout@v3
22-
- uses: actions/setup-node@v3
23-
with:
24-
node-version: ${{ matrix.node-version }}
25-
- run: npm install
26-
- run: npm test
53+
- name: 🛑 Cancel Previous Runs
54+
uses: styfle/[email protected]
2755

28-
lint:
29-
runs-on: ubuntu-latest
30-
steps:
31-
- uses: actions/checkout@v3
32-
- uses: actions/setup-node@v3
56+
- name: ⬇️ Checkout repo
57+
uses: actions/checkout@v3
58+
59+
- name: ⎔ Setup Node
60+
uses: actions/setup-node@v3
3361
with:
34-
node-version: "18.x"
35-
- run: npm install
36-
- run: npm run lint
62+
node-version: ${{ matrix.node }}
3763

38-
eslint7:
39-
runs-on: ubuntu-latest
40-
steps:
41-
- uses: actions/checkout@v3
42-
- uses: actions/setup-node@v3
43-
with:
44-
node-version: "18.x"
45-
- run: npm install
46-
- run: npm install --save-dev eslint@7
47-
- run: npm test
64+
- name: 📥 Install dependencies
65+
run: npm install
66+
67+
- name: 📥 Install ESLint
68+
run: npm install eslint@${{ matrix.eslint }}
69+
70+
- name: ▶️ Run test script
71+
run: npm run test
72+
73+
- name: ⬆️ Upload coverage report
74+
uses: codecov/codecov-action@v3
4875

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "eslint-plugin-eslint-plugin",
3-
"version": "5.0.6",
3+
"version": "0.0.0-semantically-released",
44
"description": "An ESLint plugin for linting ESLint plugins",
55
"author": "Teddy Katz",
66
"main": "./lib/index.js",

0 commit comments

Comments
 (0)