Skip to content

Commit d27b12b

Browse files
author
Akash Satheesan
authored
refactor(ci): split audit from prebuild (#3298)
Move dependency audits from prebuild to their own jobs, so that an error does not affect the rest of the build/test process.
1 parent af5a1c9 commit d27b12b

File tree

1 file changed

+28
-4
lines changed

1 file changed

+28
-4
lines changed

.github/workflows/ci.yaml

+28-4
Original file line numberDiff line numberDiff line change
@@ -43,10 +43,6 @@ jobs:
4343
if: steps.cache-yarn.outputs.cache-hit != 'true'
4444
run: yarn --frozen-lockfile
4545

46-
- name: Audit for vulnerabilities
47-
run: yarn _audit
48-
if: success()
49-
5046
- name: Run yarn fmt
5147
run: yarn fmt
5248
if: success()
@@ -63,6 +59,34 @@ jobs:
6359
run: yarn coverage
6460
if: success()
6561

62+
audit-ci:
63+
name: Run audit-ci
64+
needs: prebuild
65+
runs-on: ubuntu-latest
66+
steps:
67+
- name: Checkout repo
68+
uses: actions/checkout@v2
69+
70+
- name: Install Node.js v12
71+
uses: actions/setup-node@v2
72+
with:
73+
node-version: "12"
74+
75+
- name: Fetch dependencies from cache
76+
id: cache-yarn
77+
uses: actions/cache@v2
78+
with:
79+
path: "**/node_modules"
80+
key: yarn-build-${{ hashFiles('**/yarn.lock') }}
81+
82+
- name: Install dependencies
83+
if: steps.cache-yarn.outputs.cache-hit != 'true'
84+
run: yarn --frozen-lockfile
85+
86+
- name: Audit for vulnerabilities
87+
run: yarn _audit
88+
if: success()
89+
6690
build:
6791
name: Build
6892
needs: prebuild

0 commit comments

Comments
 (0)