-
Notifications
You must be signed in to change notification settings - Fork 1
80 lines (68 loc) · 1.99 KB
/
ci.yml
File metadata and controls
80 lines (68 loc) · 1.99 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
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
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: [16, 18, 20, 22]
exclude:
- os: windows-latest
node-version: 14
- os: macos-latest
node-version: 14
runs-on: ${{ matrix.os }}
env:
OS: ${{ matrix.os }}
NODE: ${{ matrix.node-version }}
steps:
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
with:
node-version: '*'
- 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@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
with:
node-version: ${{ matrix.node-version }}
- run: |
node ./dist/main.js ./node_modules/typescript/lib/tsc.js
eslint:
name: ESLint
runs-on: ubuntu-latest
if: ${{ github.event_name != 'schedule' }}
steps:
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
with:
node-version: '*'
- run: npm ci
- run: npx eslint .
dprint:
name: dprint
runs-on: ubuntu-latest
if: ${{ github.event_name != 'schedule' }}
steps:
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
with:
node-version: '*'
- run: npm ci
- run: npx dprint check