-
Notifications
You must be signed in to change notification settings - Fork 9
54 lines (51 loc) · 1.51 KB
/
test.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
name: Test
on:
push:
branches: [master]
pull_request:
branches: [master]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [16, 18, 20, 22]
ts-version: ["4.7", "5.0", "5.4"]
ts-eslint-version: [5, 6, 7]
eslint-version: [8, 9]
flat-config: ["true", ""]
exclude:
- eslint-version: 8
flat-config: "true"
- node-version: 16
ts-eslint-version: 7
- node-version: 16
eslint-version: 9
- ts-version: "5.4"
ts-eslint-version: 5
- ts-version: "5.4"
ts-eslint-version: 6
steps:
- uses: actions/checkout@v4
- uses: actions/cache@v4
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- run: npm ci
- run: npm run build
- run: npm run lint
- run: |
npm install -D typescript@${{ matrix.ts-version }} \
eslint@${{ matrix.eslint-version }} \
@typescript-eslint/eslint-plugin@${{ matrix.ts-eslint-version }} \
@typescript-eslint/parser@${{ matrix.ts-eslint-version }} \
--legacy-peer-deps
- run: npm test
env:
TEST_FLAT_CONFIG: ${{ matrix.flat-config }}