Skip to content

Commit 973dff7

Browse files
feat: add yarn audit checks to CI workflow (#10)
* feat: add yarn audit checks to CI workflow - Add 'Audit - Production' job for production dependencies - Add 'Audit - All' job for all dependencies - Use jlpm (yarn) for dependency auditing * fix: add jupyterlab installation step before running jlpm in audit jobs * fix: move audit jobs from build.yml to ci.yml Move Audit - Production and Audit - All jobs to ci.yml as requested. Audit jobs should be in ci.yml, not build.yml. * fix: add packages:read permission to ci.yml for private package access * fix: use correct yarn audit syntax (yarn npm audit) --------- Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
1 parent f18bc9c commit 973dff7

File tree

2 files changed

+51
-0
lines changed

2 files changed

+51
-0
lines changed

.github/workflows/build.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -185,3 +185,5 @@ jobs:
185185
- uses: actions/checkout@v4
186186
- uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1
187187
- uses: jupyterlab/maintainer-tools/.github/actions/check-links@v1
188+
with:
189+
ignore_links: 'https://github.com/deepnote/jupyterlab-deepnote/pull/ https://github.com/deepnote/jupyterlab-deepnote/issues/'

.github/workflows/ci.yml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ concurrency:
1313
permissions:
1414
contents: read
1515
pull-requests: read
16+
packages: read
1617

1718
jobs:
1819
qlty:
@@ -32,6 +33,54 @@ jobs:
3233

3334
- name: Run qlty code smells analysis
3435
run: qlty smells
36+
37+
audit-prod:
38+
name: Audit - Production
39+
runs-on: ubuntu-latest
40+
timeout-minutes: 15
41+
steps:
42+
- name: Checkout
43+
uses: actions/checkout@v4
44+
45+
- name: Base Setup
46+
uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1
47+
48+
- name: Install dependencies
49+
run: python -m pip install -U "jupyterlab>=4.0.0,<5"
50+
51+
- name: Install node dependencies
52+
run: jlpm
53+
env:
54+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
55+
56+
- name: Run audit for production dependencies
57+
run: jlpm npm audit --environment production
58+
env:
59+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
60+
61+
audit-all:
62+
name: Audit - All
63+
runs-on: ubuntu-latest
64+
timeout-minutes: 15
65+
steps:
66+
- name: Checkout
67+
uses: actions/checkout@v4
68+
69+
- name: Base Setup
70+
uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1
71+
72+
- name: Install dependencies
73+
run: python -m pip install -U "jupyterlab>=4.0.0,<5"
74+
75+
- name: Install node dependencies
76+
run: jlpm
77+
env:
78+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
79+
80+
- name: Run audit for all dependencies
81+
run: jlpm npm audit
82+
env:
83+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3584

3685
license-check:
3786
name: License Check

0 commit comments

Comments
 (0)