Skip to content

Commit 23f619e

Browse files
chore(CI): simplify testing strategy (#1)
1 parent 872bd3b commit 23f619e

File tree

2 files changed

+50
-15
lines changed

2 files changed

+50
-15
lines changed

.github/workflows/CI.yml

Lines changed: 49 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -3,31 +3,66 @@ on:
33
push:
44
branches: [main]
55
pull_request:
6-
branches: [main]
76
schedule:
87
- cron: 0 0 * * 0
98

109
jobs:
11-
test:
12-
name: Test
10+
lint:
1311
runs-on: ubuntu-latest
12+
steps:
13+
- name: Checkout
14+
uses: actions/checkout@v3
15+
16+
- name: Install Node
17+
uses: actions/setup-node@v3
18+
with:
19+
node-version: 18
20+
21+
- name: Install Packages
22+
run: npm install
23+
24+
- name: Lint
25+
run: npm run lint
26+
27+
test:
28+
name: Test (Node@${{ matrix.node }} - ESLint@${{ matrix.eslint }} - ${{ matrix.os }})
1429
strategy:
1530
matrix:
16-
node: [12.x, 10.x, 8.x]
31+
eslint: [6]
32+
node: [8, 10, 12, 14, 16, 18]
33+
os: [ubuntu-latest]
34+
include:
35+
# On other platforms
36+
- os: windows-latest
37+
eslint: 6
38+
node: 18
39+
- os: macos-latest
40+
eslint: 6
41+
node: 18
42+
# On the minimum supported ESLint/Node.js version
43+
- eslint: 6.6.0
44+
node: 8.10.0
45+
os: ubuntu-latest
46+
runs-on: ${{ matrix.os }}
1747
steps:
1848
- name: Checkout
19-
uses: actions/checkout@v1
20-
with:
21-
fetch-depth: 1
22-
- name: Install Node.js ${{ matrix.node }}
23-
uses: actions/setup-node@v1
49+
uses: actions/checkout@v3
50+
51+
- name: Install Node@${{ matrix.node }}
52+
uses: actions/setup-node@v3
2453
with:
2554
node-version: ${{ matrix.node }}
55+
2656
- name: Install Packages
2757
run: npm install
58+
59+
# - name: Install ESLint@${{ matrix.eslint }}
60+
# run: npm install eslint@${{ matrix.eslint }}
61+
2862
- name: Test
29-
run: npm test
30-
- name: Send Coverage
31-
run: npm run -s codecov
32-
env:
33-
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
63+
run: npm run test
64+
65+
# - name: Send Coverage
66+
# run: npm run -s codecov
67+
# env:
68+
# CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
"coverage": "opener coverage/lcov-report/index.html",
4242
"codecov": "codecov --disable=gcov -t $CODECOV_TOKEN",
4343
"lint": "eslint lib scripts tests",
44-
"test": "npm run -s lint && nyc mocha \"tests/lib/**/*.js\" --reporter dot",
44+
"test": "nyc mocha \"tests/lib/**/*.js\" --reporter dot",
4545
"update": "node scripts/generate-browser-globals && node scripts/generate-configs && node scripts/generate-rules",
4646
"preversion": "run-s clean update test",
4747
"version": "eslint lib/rules --fix && git add lib",

0 commit comments

Comments
 (0)