Skip to content

Commit 27195e2

Browse files
committed
chore(CI): simplify testing strategy
1 parent f45c614 commit 27195e2

File tree

1 file changed

+23
-73
lines changed

1 file changed

+23
-73
lines changed

.github/workflows/CI.yml

+23-73
Original file line numberDiff line numberDiff line change
@@ -13,100 +13,50 @@ jobs:
1313
runs-on: ubuntu-latest
1414
steps:
1515
- name: Checkout
16-
uses: actions/checkout@v1
17-
with:
18-
fetch-depth: 1
16+
uses: actions/checkout@v2
1917
- name: Install Node.js
20-
uses: actions/setup-node@v1
18+
uses: actions/setup-node@v2
2119
with:
22-
node: 12.x
20+
node-version: 16
2321
- name: Install Packages
2422
run: npm install
2523
- name: Lint
2624
run: npm run -s lint
2725

2826
test:
2927
name: Test
30-
3128
strategy:
3229
matrix:
33-
os: [ubuntu-latest, windows-latest, macOS-latest]
34-
eslint: [6.x, 5.x]
35-
node: [13.x, 12.x, 10.x, 8.x]
36-
exclude:
37-
# On Windows, run tests with only the latest LTS environments.
38-
- os: windows-latest
39-
eslint: 6.x
40-
node: 13.x
41-
- os: windows-latest
42-
eslint: 6.x
43-
node: 10.x
44-
- os: windows-latest
45-
eslint: 6.x
46-
node: 8.x
30+
os: [ubuntu-latest]
31+
eslint: [6]
32+
node: [8, 10, 12, 14, 16]
33+
include:
34+
# On other platforms
4735
- os: windows-latest
48-
eslint: 5.x
49-
node: 13.x
50-
- os: windows-latest
51-
eslint: 5.x
52-
node: 12.x
53-
- os: windows-latest
54-
eslint: 5.x
55-
node: 10.x
56-
- os: windows-latest
57-
eslint: 5.x
58-
node: 8.x
59-
# On macOS, run tests with only the latest LTS environments.
60-
- os: macOS-latest
61-
eslint: 6.x
62-
node: 13.x
63-
- os: macOS-latest
64-
eslint: 6.x
65-
node: 10.x
66-
- os: macOS-latest
67-
eslint: 6.x
68-
node: 8.x
69-
- os: macOS-latest
70-
eslint: 5.x
71-
node: 13.x
72-
- os: macOS-latest
73-
eslint: 5.x
74-
node: 12.x
75-
- os: macOS-latest
76-
eslint: 5.x
77-
node: 10.x
78-
- os: macOS-latest
79-
eslint: 5.x
80-
node: 8.x
81-
# Run ESLint 5.x tests on only the latest LTS Node.
82-
- os: ubuntu-latest
83-
eslint: 5.x
84-
node: 13.x
85-
- os: ubuntu-latest
86-
eslint: 5.x
87-
node: 10.x
88-
- os: ubuntu-latest
89-
eslint: 5.x
90-
node: 8.x
36+
node: 16
37+
- os: macos-latest
38+
node: 16
39+
# On old ESLint versions
40+
- eslint: 5
41+
node: 16
42+
# On the minimum supported ESLint/Node.js version
43+
- eslint: 5.16.0
44+
node: 8.10.0
9145

9246
runs-on: ${{ matrix.os }}
9347
steps:
9448
- name: Checkout
95-
uses: actions/checkout@v1
96-
with:
97-
fetch-depth: 1
49+
uses: actions/checkout@v2
9850
- name: Install Node.js ${{ matrix.node }}
99-
uses: actions/setup-node@v1
51+
uses: actions/setup-node@v2
10052
with:
10153
node-version: ${{ matrix.node }}
10254
- name: Install Packages
10355
run: npm install
104-
- name: Install ESLint ${{ matrix.eslint }}
105-
# We need to execute this command twice because of npm's bug.
106-
# See also: https://npm.community/t/error-node-modules-staging-eslint-e7cf6846-node-modules-eslint
107-
run: |
108-
npm install --no-save eslint@${{ matrix.eslint }}
109-
npm install --no-save eslint@${{ matrix.eslint }}
56+
env:
57+
CI: true
58+
- name: Install ESLint@${{ matrix.eslint }}
59+
run: npm install eslint@${{ matrix.eslint }}
11060
- name: Test
11161
run: npm run -s test:ci
11262
- name: Send Coverage

0 commit comments

Comments
 (0)