-
Notifications
You must be signed in to change notification settings - Fork 13
48 lines (45 loc) · 1.32 KB
/
test.yml
File metadata and controls
48 lines (45 loc) · 1.32 KB
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
name: Test
on:
push:
branches: [master]
pull_request:
branches: [master]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [20, 22]
ts-version: ["5.0", "5.4", "5.8"]
ts-eslint-version: [8]
eslint-version: [8, 9, 10]
flat-config: ["true", ""]
exclude:
- eslint-version: 8
flat-config: "true"
- eslint-version: 10
flat-config: ""
steps:
- uses: actions/checkout@v6
- uses: actions/cache@v5
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@v6
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 }}