forked from Synthetixio/synpress
-
Notifications
You must be signed in to change notification settings - Fork 5
77 lines (63 loc) · 2.17 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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
name: Synpress CI
on:
push:
pull_request:
branches: [master, 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/master' || github.ref == 'refs/heads/dev' ||
github.event_name == 'pull_request'
runs-on: ubuntu-latest
container:
image: synthetixio/docker-sec-tools:18.16-alpine
steps:
- name: Checkout
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # pin@v2
- 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:18.16-alpine
steps:
- name: Checkout
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # pin@v2
- name: Set pnpm cache directory
run: pnpm config set store-dir .pnpm-store
continue-on-error: true
- name: Setup cache
uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # 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
if:
github.ref == 'refs/heads/master' || github.ref == 'refs/heads/dev' ||
github.event_name == 'pull_request'
run: pnpm lint
# run: yarn lint:sarif
# - name: Upload lint results
# if:
# always() && (github.ref == 'refs/heads/master' || github.ref ==
# 'refs/heads/dev' || github.event_name == 'pull_request')
# uses: github/codeql-action/upload-sarif@32dc499307d133bb5085bae78498c0ac2cf762d5 # pin@codeql-bundle-20210517
# with:
# sarif_file: lint-results.sarif
# continue-on-error: true