Skip to content

Commit 461c2b0

Browse files
committed
chore(ci): move audit out of test
1 parent 2a84473 commit 461c2b0

File tree

1 file changed

+21
-4
lines changed

1 file changed

+21
-4
lines changed

.github/workflows/main.yaml

Lines changed: 21 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -57,9 +57,6 @@ jobs:
5757
- name: Install dependencies
5858
run: npm ci
5959

60-
- name: Audit dependencies
61-
run: npm audit
62-
6360
- name: Check for circular dependencies
6461
run: npx madge --circular . --extensions ts,js
6562

@@ -73,9 +70,29 @@ jobs:
7370
token: ${{ secrets.CODECOV_TOKEN }}
7471
slug: openfga/js-sdk
7572

73+
audit:
74+
runs-on: ubuntu-latest
75+
76+
steps:
77+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
78+
with:
79+
fetch-depth: 0
80+
81+
- name: Set up node
82+
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
83+
with:
84+
node-version: ${{ env.NODE_VERSION }}
85+
cache: "npm"
86+
87+
- name: Install dependencies
88+
run: npm ci
89+
90+
- name: Audit dependencies
91+
run: npm audit
92+
7693
publish:
7794
if: startsWith(github.ref, 'refs/tags/v')
78-
needs: [build, test]
95+
needs: [build, test, audit]
7996
runs-on: ubuntu-latest
8097

8198
permissions:

0 commit comments

Comments
 (0)