1111 NODE_VERSION : 22.x
1212
1313permissions :
14- contents : read
1514 actions : read
15+ contents : read
16+ packages : read
1617
1718concurrency :
1819 group : ${{ github.workflow }}-${{ github.ref }}
@@ -25,67 +26,191 @@ jobs:
2526 timeout-minutes : 15
2627 steps :
2728 - name : Checkout
28- uses : actions/checkout@v5
29+ uses : actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5
2930
3031 - name : Setup Node.js
31- uses : actions/setup-node@v5
32+ uses : actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5
3233 with :
33- node-version : ${{ env.NODE_VERSION }}
3434 cache : ' npm'
35+ node-version : ${{ env.NODE_VERSION }}
36+ registry-url : ' https://npm.pkg.github.com'
37+ scope : ' @deepnote'
3538
3639 - name : Install dependencies
3740 run : npm ci --prefer-offline --no-audit
41+ env :
42+ NODE_AUTH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
3843
3944 - name : Run ESLint
4045 run : npm run lint
4146
4247 - name : Check Prettier formatting
4348 run : npm run format
4449
50+ typecheck :
51+ name : TypeCheck
52+ runs-on : ubuntu-latest
53+ timeout-minutes : 15
54+ steps :
55+ - name : Checkout
56+ uses : actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5
57+
58+ - name : Setup Node.js
59+ uses : actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5
60+ with :
61+ cache : ' npm'
62+ node-version : ${{ env.NODE_VERSION }}
63+ registry-url : ' https://npm.pkg.github.com'
64+ scope : ' @deepnote'
65+
66+ - name : Install dependencies
67+ run : npm ci --prefer-offline --no-audit
68+ env :
69+ NODE_AUTH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
70+
71+ - name : Run TypeScript type checking
72+ run : npm run typecheck
73+
74+ qlty :
75+ name : Qlty Check
76+ runs-on : ubuntu-latest
77+ timeout-minutes : 3
78+
79+ steps :
80+ - name : Checkout code
81+ uses : actions/checkout@ff7abcd0c3c05ccf6adc123a8cd1fd4fb30fb493
82+
83+ - name : Install qlty
84+ uses : qltysh/qlty-action/install@a19242102d17e497f437d7466aa01b528537e899
85+
86+ - name : Run qlty check
87+ run : qlty check
88+
89+ - name : Run qlty code smells analysis
90+ run : qlty smells
91+
4592 build :
4693 name : Build & Test
4794 runs-on : ubuntu-latest
4895 timeout-minutes : 15
96+ permissions :
97+ id-token : write
98+ contents : read
99+ packages : read
49100 steps :
50101 - name : Checkout
51- uses : actions/checkout@v5
102+ uses : actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5
52103
53104 - name : Setup Node.js
54- uses : actions/setup-node@v5
105+ uses : actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5
55106 with :
56- node-version : ${{ env.NODE_VERSION }}
57107 cache : ' npm'
108+ node-version : ${{ env.NODE_VERSION }}
109+ registry-url : ' https://npm.pkg.github.com'
110+ scope : ' @deepnote'
58111
59112 - name : Install dependencies
60113 run : npm ci --prefer-offline --no-audit
114+ env :
115+ NODE_AUTH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
61116
62117 - name : Compile TypeScript
63118 run : npm run compile
64119
65120 - name : Run tests
66121 run : npm test
122+ env :
123+ VSC_JUPYTER_INSTRUMENT_CODE_FOR_COVERAGE : true
124+
125+ - name : Upload coverage to Codecov
126+ uses : codecov/codecov-action@5a1091511ad55cbe89839c7260b706298ca349f7 # v5
127+ with :
128+ use_oidc : true
129+ files : coverage/lcov.info
130+ fail_ci_if_error : true
131+
132+ - name : Upload test results to Codecov
133+ if : ' !cancelled()'
134+ uses : codecov/test-results-action@47f89e9acb64b76debcd5ea40642d25a4adced9f # v1
135+ with :
136+ use_oidc : true
137+ files : test-results.xml
138+ fail_ci_if_error : true
67139
68140 - name : Check dependencies
69141 run : npm run checkDependencies
70142 continue-on-error : true
71143
72144 - name : Check licenses
73145 run : npm run check-licenses
146+
74147 check_licenses :
75148 name : Check Licenses
76149 runs-on : ubuntu-latest
77150 steps :
78151 - name : Checkout
79- uses : actions/checkout@v5
152+ uses : actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5
80153
81154 - name : Setup Node.js
82- uses : actions/setup-node@v5
155+ uses : actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5
83156 with :
84- node-version : ${{ env.NODE_VERSION }}
85157 cache : ' npm'
158+ node-version : ${{ env.NODE_VERSION }}
159+ registry-url : ' https://npm.pkg.github.com'
160+ scope : ' @deepnote'
86161
87162 - name : Install dependencies
88163 run : npm ci
164+ env :
165+ NODE_AUTH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
89166
90167 - name : Check Licenses
91168 run : npm run check-licenses
169+
170+ audit-prod :
171+ name : Audit - Production
172+ runs-on : ubuntu-latest
173+ timeout-minutes : 15
174+ steps :
175+ - name : Checkout
176+ uses : actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5
177+
178+ - name : Setup Node.js
179+ uses : actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5
180+ with :
181+ cache : ' npm'
182+ node-version : ${{ env.NODE_VERSION }}
183+ registry-url : ' https://npm.pkg.github.com'
184+ scope : ' @deepnote'
185+
186+ - name : Install dependencies
187+ run : npm ci --prefer-offline --no-audit
188+ env :
189+ NODE_AUTH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
190+
191+ - name : Run audit for production dependencies
192+ run : npm audit --production
193+
194+ audit-all :
195+ name : Audit - All
196+ runs-on : ubuntu-latest
197+ timeout-minutes : 15
198+ steps :
199+ - name : Checkout
200+ uses : actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5
201+
202+ - name : Setup Node.js
203+ uses : actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5
204+ with :
205+ cache : ' npm'
206+ node-version : ${{ env.NODE_VERSION }}
207+ registry-url : ' https://npm.pkg.github.com'
208+ scope : ' @deepnote'
209+
210+ - name : Install dependencies
211+ run : npm ci --prefer-offline --no-audit
212+ env :
213+ NODE_AUTH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
214+
215+ - name : Run audit for all dependencies
216+ run : npm audit
0 commit comments