-
Notifications
You must be signed in to change notification settings - Fork 8
72 lines (60 loc) · 1.49 KB
/
ci.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
name: CI
on:
push:
branches:
- main
pull_request:
branches:
- main
schedule:
- cron: '15 0 * * *'
jobs:
test:
name: Test
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
node-version: [12, 14, 16, 18, 20]
runs-on: ${{ matrix.os }}
env:
OS: ${{ matrix.os }}
NODE: ${{ matrix.node-version }}
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- run: npm ci
if: ${{ github.event_name != 'schedule' }}
- shell: bash
run: |
npm install -g $(jq -r '.packageManager' < package.json)
rm package-lock.json
npm i
if: ${{ github.event_name == 'schedule' }}
- run: npm run build
- uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- run: npm run coverage
- uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
env_vars: OS,NODE
eslint:
name: ESLint
runs-on: ubuntu-latest
if: ${{ github.event_name != 'schedule' }}
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- run: npm ci
- run: npx eslint .
dprint:
name: dprint
runs-on: ubuntu-latest
if: ${{ github.event_name != 'schedule' }}
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- run: npm ci
- run: npx dprint check