-
Notifications
You must be signed in to change notification settings - Fork 0
60 lines (47 loc) · 1.56 KB
/
audit_and_lint.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
name: SNX-API CI
on:
push:
pull_request:
branches: [main, dev]
concurrency:
group:
'${{ github.workflow }} @ ${{ github.event.pull_request.head.label ||
github.head_ref || github.ref }}'
cancel-in-progress: true
jobs:
audit:
if: github.ref == 'refs/heads/main' || github.ref == 'refs/heads/dev' || github.event_name == 'pull_request'
runs-on: ubuntu-latest
container:
image: synthetixio/docker-sec-tools:20.12-alpine
steps:
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
- name: Audit dependencies
run: audit-ci --critical --report-type full
build:
needs: audit
if: always() && (needs.audit.result == 'success' || needs.audit.result == 'skipped')
runs-on: ubuntu-latest
container:
image: synthetixio/docker-node:20.12-alpine
steps:
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
- name: Set pnpm cache directory
run: pnpm config set store-dir .pnpm-store
continue-on-error: true
- name: Setup cache
uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # pin@v2
with:
path: |
.pnpm-store
node_modules
key: ${{ runner.os }}-pnpm-v1-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-v1-
continue-on-error: true
- name: Install dependencies
run: pnpm install --frozen-lockfile --prefer-offline
- name: Lint
run: pnpm lint