-
Notifications
You must be signed in to change notification settings - Fork 51
88 lines (81 loc) · 2.18 KB
/
tests.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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
name: Tests
on:
pull_request:
push:
branches:
- main
schedule:
# Every sunday at midnight
- cron: "0 0 * * 0"
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
cache: npm
- run: npm ci
- run: npm run lint
- run: npm run format
- run: node tools/toc.js check
- run: npx markdown-link-check -p README.md
integration:
runs-on: ${{ matrix.os }}
needs: lint
strategy:
matrix:
os: [ubuntu-latest]
eslint: ["4.7", latest, next]
include:
# Windows support
- os: windows-latest
eslint: latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
cache: npm
# https://github.com/actions/setup-node/issues/515#issuecomment-1153685437
- if: ${{ matrix.os == 'windows-latest' }}
run: |
$WhereNode = Get-Command node | Select-Object -ExpandProperty Definition
$NodeDirPath = Split-Path $WhereNode -Parent
cd $NodeDirPath
npm install npm@8.12.1
- run: npm ci
- run: bash tools/integration-tests.bash ${{ matrix.eslint }}
test:
runs-on: ${{ matrix.os }}
needs: lint
strategy:
matrix:
os: [ubuntu-latest]
node: [16, 18, 20]
eslint: [latest]
include:
# ESLint 4.7 support: lowest version supported
- os: ubuntu-latest
node: 20
eslint: "4.7"
# ESLint 5 support: lowest version we can use to test external html plugins support
- os: ubuntu-latest
node: 20
eslint: "5.0"
# Upcoming ESLint major version support
- os: ubuntu-latest
node: 20
eslint: next
# Windows support
- os: windows-latest
node: 20
eslint: latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}
cache: npm
- run: npm ci
- run: npm install eslint@${{ matrix.eslint }}
- run: npm test