Skip to content

Commit f5b1ad6

Browse files
Use .nvmrc for Node version in CI/CD workflows and npm install in post-checkout hook
- Update all workflow files (ci.yml, package.yml, deps.yml, copilot-setup-steps.yml) to use node-version-file: '.nvmrc' instead of hardcoded NODE_VERSION - Remove NODE_VERSION environment variable from workflow files - Change post-checkout hook from npm ci to npm install for local development - All CI workflows continue to use npm ci as expected
1 parent 1ab2214 commit f5b1ad6

File tree

5 files changed

+13
-23
lines changed

5 files changed

+13
-23
lines changed

.github/workflows/ci.yml

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,6 @@ on:
77
branches: [main]
88
workflow_dispatch:
99

10-
env:
11-
NODE_VERSION: 22.x
12-
1310
permissions:
1411
actions: read
1512
contents: read
@@ -32,7 +29,7 @@ jobs:
3229
uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v5
3330
with:
3431
cache: 'npm'
35-
node-version: ${{ env.NODE_VERSION }}
32+
node-version-file: '.nvmrc'
3633
registry-url: 'https://npm.pkg.github.com'
3734
scope: '@deepnote'
3835

@@ -59,7 +56,7 @@ jobs:
5956
uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v5
6057
with:
6158
cache: 'npm'
62-
node-version: ${{ env.NODE_VERSION }}
59+
node-version-file: '.nvmrc'
6360
registry-url: 'https://npm.pkg.github.com'
6461
scope: '@deepnote'
6562

@@ -105,7 +102,7 @@ jobs:
105102
uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v5
106103
with:
107104
cache: 'npm'
108-
node-version: ${{ env.NODE_VERSION }}
105+
node-version-file: '.nvmrc'
109106
registry-url: 'https://npm.pkg.github.com'
110107
scope: '@deepnote'
111108

@@ -155,7 +152,7 @@ jobs:
155152
uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v5
156153
with:
157154
cache: 'npm'
158-
node-version: ${{ env.NODE_VERSION }}
155+
node-version-file: '.nvmrc'
159156
registry-url: 'https://npm.pkg.github.com'
160157
scope: '@deepnote'
161158

@@ -179,7 +176,7 @@ jobs:
179176
uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5
180177
with:
181178
cache: 'npm'
182-
node-version: ${{ env.NODE_VERSION }}
179+
node-version-file: '.nvmrc'
183180
registry-url: 'https://npm.pkg.github.com'
184181
scope: '@deepnote'
185182

@@ -203,7 +200,7 @@ jobs:
203200
uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v5
204201
with:
205202
cache: 'npm'
206-
node-version: ${{ env.NODE_VERSION }}
203+
node-version-file: '.nvmrc'
207204
registry-url: 'https://npm.pkg.github.com'
208205
scope: '@deepnote'
209206

@@ -227,7 +224,7 @@ jobs:
227224
uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v5
228225
with:
229226
cache: 'npm'
230-
node-version: ${{ env.NODE_VERSION }}
227+
node-version-file: '.nvmrc'
231228
registry-url: 'https://npm.pkg.github.com'
232229
scope: '@deepnote'
233230

.github/workflows/copilot-setup-steps.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ on:
1212
- .github/workflows/copilot-setup-steps.yml
1313

1414
env:
15-
NODE_VERSION: 22.15.1
1615
NPM_VERSION: 10.9.2
1716
PYTHON_VERSION: 3.12
1817
DENO_VERSION: '~1.37'
@@ -39,10 +38,10 @@ jobs:
3938
- name: Checkout code
4039
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5
4140

42-
- name: Use Node ${{env.NODE_VERSION}}
41+
- name: Setup Node.js
4342
uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v5
4443
with:
45-
node-version: ${{env.NODE_VERSION}}
44+
node-version-file: '.nvmrc'
4645
registry-url: 'https://npm.pkg.github.com'
4746
scope: '@deepnote'
4847

.github/workflows/deps.yml

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,6 @@ on:
66
- cron: '0 9 * * 1'
77
workflow_dispatch:
88

9-
env:
10-
NODE_VERSION: 22.x
11-
129
permissions:
1310
actions: read
1411
contents: read
@@ -30,7 +27,7 @@ jobs:
3027
uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v5
3128
with:
3229
cache: 'npm'
33-
node-version: ${{ env.NODE_VERSION }}
30+
node-version-file: '.nvmrc'
3431
registry-url: 'https://npm.pkg.github.com'
3532
scope: '@deepnote'
3633

@@ -62,7 +59,7 @@ jobs:
6259
- name: Setup Node.js
6360
uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v5
6461
with:
65-
node-version: ${{ env.NODE_VERSION }}
62+
node-version-file: '.nvmrc'
6663
cache: 'npm'
6764

6865
- name: Install dependencies

.github/workflows/package.yml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,6 @@ on:
77
branches: [main]
88
workflow_dispatch:
99

10-
env:
11-
NODE_VERSION: 22.x
12-
1310
permissions:
1411
contents: read
1512
packages: read
@@ -31,7 +28,7 @@ jobs:
3128
uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5
3229
with:
3330
cache: 'npm'
34-
node-version: ${{ env.NODE_VERSION }}
31+
node-version-file: '.nvmrc'
3532
registry-url: 'https://npm.pkg.github.com'
3633
scope: '@deepnote'
3734

.husky/post-checkout

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
npm ci
1+
npm install

0 commit comments

Comments
 (0)