-
Notifications
You must be signed in to change notification settings - Fork 97
114 lines (110 loc) · 3.36 KB
/
check.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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
name: Check
on:
# Run on pushes to main..
push:
branches:
- main
# ..and any pull request.
pull_request:
workflow_dispatch:
# Cron job to run checks @ 8:30 pm daily on the latest commit on the default branch - main
schedule:
- cron: '30 20 * * *'
# Cancel any in progress run of the workflow for a given PR
# This avoids building outdated code
concurrency:
# Fallback used github.head_ref as it only defined on pull_request
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
cancel-in-progress: true
jobs:
vulnerability:
name: Vulnerabilities
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: '16'
check-latest: true
- uses: actions/cache@v3
with:
path: |
node_modules
*/*/node_modules
key: ${{ runner.os }}-${{ hashFiles('**/yarn.lock', 'patches/*.patch') }}
- run: yarn || yarn --network-concurrency 1
- run: ./scripts/ci_check_vulnerabilities.sh
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: '16'
check-latest: true
# https://github.com/actions/cache/blob/main/examples.md#node---lerna
- uses: actions/cache@v3
with:
path: |
node_modules
*/*/node_modules
key: ${{ runner.os }}-${{ hashFiles('**/yarn.lock', 'patches/*.patch') }}
- run: yarn || yarn --network-concurrency 1
- run: yarn run format:check
- run: yarn run lint
- run: yarn tsc -p .github/scripts
yarn-lock:
name: 'yarn.lock Up-to-date'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: '16'
check-latest: true
# https://github.com/actions/cache/blob/main/examples.md#node---lerna
- uses: actions/cache@v3
with:
path: |
node_modules
*/*/node_modules
key: ${{ runner.os }}-${{ hashFiles('**/yarn.lock', 'patches/*.patch') }}
- run: yarn || yarn --network-concurrency 1
- run: git diff --exit-code
licenses:
name: Licenses
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: '16'
check-latest: true
# https://github.com/actions/cache/blob/main/examples.md#node---lerna
- uses: actions/cache@v3
with:
path: |
node_modules
*/*/node_modules
key: ${{ runner.os }}-${{ hashFiles('**/yarn.lock', 'patches/*.patch') }}
- run: yarn || yarn --network-concurrency 1
- run: yarn check-licenses
depcheck:
name: Dependencies
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: '16'
check-latest: true
# https://github.com/actions/cache/blob/main/examples.md#node---lerna
- uses: actions/cache@v3
with:
path: |
node_modules
*/*/node_modules
key: ${{ runner.os }}-${{ hashFiles('**/yarn.lock', 'patches/*.patch') }}
- run: yarn || yarn --network-concurrency 1
- run: yarn depcheck