-
-
Notifications
You must be signed in to change notification settings - Fork 253
47 lines (36 loc) · 1.02 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
name: Test
on:
push:
branches:
- "main"
pull_request:
jobs:
main:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macOS-latest]
node: [10, 12, 14, 16]
eslint: [7, 8]
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node }}
- name: Cache node_modules
id: cache-node_modules
uses: actions/cache@v2
with:
path: node_modules
key: node_modules-${{ matrix.os }}-${{ matrix.node }}-${{ hashFiles('package-lock.json') }}
- name: npm ci
if: steps.cache-node_modules.outputs.cache-hit != 'true'
run: npm ci
- name: install ESLint v@${{ matrix.eslint }}
run: npm install eslint@${{ matrix.eslint }}
- name: Jest
run: npx --no-install jest
- name: CLI sanity
run: npm run test:cli-sanity
- name: CLI sanity warning
run: npm run test:cli-sanity-warning