Skip to content

Commit b9dbc39

Browse files
authored
build: Update (internal) node version to 16.x (#6236)
1 parent 9e6fd1a commit b9dbc39

File tree

3 files changed

+22
-41
lines changed

3 files changed

+22
-41
lines changed

.github/workflows/build.yml

Lines changed: 15 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,6 @@ concurrency:
1818
cancel-in-progress: true
1919

2020
env:
21-
# We pin the exact version to enforce reproducable builds with node + npm.
22-
DEFAULT_NODE_VERSION: '16.15.1'
23-
2421
HEAD_COMMIT: ${{ github.event.inputs.commit || github.sha }}
2522

2623
CACHED_DEPENDENCY_PATHS: |
@@ -132,9 +129,7 @@ jobs:
132129
with:
133130
ref: ${{ env.HEAD_COMMIT }}
134131
- name: Set up Node
135-
uses: actions/setup-node@v3
136-
with:
137-
node-version: ${{ env.DEFAULT_NODE_VERSION }}
132+
uses: volta-cli/action@v4
138133
# we use a hash of yarn.lock as our cache key, because if it hasn't changed, our dependencies haven't changed,
139134
# so no need to reinstall them
140135
- name: Compute dependency cache key
@@ -163,10 +158,7 @@ jobs:
163158
with:
164159
ref: ${{ env.HEAD_COMMIT }}
165160
- name: Set up Node
166-
uses: actions/setup-node@v3
167-
with:
168-
# ember won't build under node 16, at least not with the versions of the ember build tools we use
169-
node-version: '14'
161+
uses: volta-cli/action@v4
170162
- name: Check dependency cache
171163
uses: actions/cache@v3
172164
with:
@@ -202,9 +194,7 @@ jobs:
202194
with:
203195
ref: ${{ env.HEAD_COMMIT }}
204196
- name: Set up Node
205-
uses: actions/setup-node@v3
206-
with:
207-
node-version: ${{ env.DEFAULT_NODE_VERSION }}
197+
uses: volta-cli/action@v4
208198
- name: Check dependency cache
209199
uses: actions/cache@v3
210200
with:
@@ -282,9 +272,7 @@ jobs:
282272
with:
283273
ref: ${{ env.HEAD_COMMIT }}
284274
- name: Set up Node
285-
uses: actions/setup-node@v3
286-
with:
287-
node-version: ${{ env.DEFAULT_NODE_VERSION }}
275+
uses: volta-cli/action@v4
288276
- name: Check dependency cache
289277
uses: actions/cache@v3
290278
with:
@@ -309,9 +297,7 @@ jobs:
309297
with:
310298
ref: ${{ env.HEAD_COMMIT }}
311299
- name: Set up Node
312-
uses: actions/setup-node@v3
313-
with:
314-
node-version: ${{ env.DEFAULT_NODE_VERSION }}
300+
uses: volta-cli/action@v4
315301
- name: Check dependency cache
316302
uses: actions/cache@v3
317303
with:
@@ -337,9 +323,7 @@ jobs:
337323
with:
338324
ref: ${{ env.HEAD_COMMIT }}
339325
- name: Set up Node
340-
uses: actions/setup-node@v3
341-
with:
342-
node-version: ${{ env.DEFAULT_NODE_VERSION }}
326+
uses: volta-cli/action@v4
343327
- name: Check dependency cache
344328
uses: actions/cache@v3
345329
with:
@@ -509,9 +493,7 @@ jobs:
509493
with:
510494
ref: ${{ env.HEAD_COMMIT }}
511495
- name: Set up Node
512-
uses: actions/setup-node@v3
513-
with:
514-
node-version: ${{ env.DEFAULT_NODE_VERSION }}
496+
uses: volta-cli/action@v4
515497
- name: Check dependency cache
516498
uses: actions/cache@v3
517499
with:
@@ -550,9 +532,7 @@ jobs:
550532
with:
551533
ref: ${{ env.HEAD_COMMIT }}
552534
- name: Set up Node
553-
uses: actions/setup-node@v3
554-
with:
555-
node-version: ${{ env.DEFAULT_NODE_VERSION }}
535+
uses: volta-cli/action@v4
556536
- name: Check dependency cache
557537
uses: actions/cache@v3
558538
with:
@@ -582,9 +562,7 @@ jobs:
582562
with:
583563
ref: ${{ env.HEAD_COMMIT }}
584564
- name: Set up Node
585-
uses: actions/setup-node@v3
586-
with:
587-
node-version: ${{ env.DEFAULT_NODE_VERSION }}
565+
uses: volta-cli/action@v4
588566
- name: Check dependency cache
589567
uses: actions/cache@v3
590568
with:
@@ -692,9 +670,7 @@ jobs:
692670
with:
693671
ref: ${{ env.HEAD_COMMIT }}
694672
- name: Set up Node
695-
uses: actions/setup-node@v3
696-
with:
697-
node-version: ${{ env.DEFAULT_NODE_VERSION }}
673+
uses: volta-cli/action@v4
698674
- name: Check dependency cache
699675
uses: actions/cache@v3
700676
with:
@@ -705,9 +681,13 @@ jobs:
705681
with:
706682
path: ${{ env.CACHED_BUILD_PATHS }}
707683
key: ${{ env.BUILD_CACHE_KEY }}
684+
- name: Get node version
685+
id: versions
686+
run: |
687+
echo "echo node=$(jq -r '.volta.node' package.json)" >> $GITHUB_OUTPUT
708688
- name: Run E2E tests
709689
env:
710-
E2E_TEST_PUBLISH_SCRIPT_NODE_VERSION: ${{ env.DEFAULT_NODE_VERSION }}
690+
E2E_TEST_PUBLISH_SCRIPT_NODE_VERSION: ${{ steps.versions.outputs.node }}
711691
E2E_TEST_AUTH_TOKEN: ${{ secrets.E2E_TEST_AUTH_TOKEN }}
712692
E2E_TEST_DSN: ${{ secrets.E2E_TEST_DSN }}
713693
run: |

.github/workflows/canary.yml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,17 +27,18 @@ jobs:
2727
with:
2828
ref: ${{ env.HEAD_COMMIT }}
2929
- name: Set up Node
30-
uses: actions/setup-node@v3
31-
with:
32-
# ember won't build under node 16, at least not with the versions of the ember build tools we use
33-
node-version: 14
30+
uses: volta-cli/action@v4
3431
- name: Install dependencies
3532
run: yarn install --ignore-engines --frozen-lockfile
3633
- name: Build packages
3734
run: yarn build
35+
- name: Get node version
36+
id: versions
37+
run: |
38+
echo "echo node=$(jq -r '.volta.node' package.json)" >> $GITHUB_OUTPUT
3839
- name: Run Canary Tests
3940
env:
40-
E2E_TEST_PUBLISH_SCRIPT_NODE_VERSION: ${{ env.DEFAULT_NODE_VERSION }}
41+
E2E_TEST_PUBLISH_SCRIPT_NODE_VERSION: ${{ steps.versions.outputs.node }}
4142
E2E_TEST_AUTH_TOKEN: ${{ secrets.E2E_TEST_AUTH_TOKEN }}
4243
E2E_TEST_DSN: ${{ secrets.E2E_TEST_DSN }}
4344
CANARY_E2E_TEST: 'yes'

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
"test-ci": "ts-node ./scripts/test.ts"
2929
},
3030
"volta": {
31-
"node": "14.17.0",
31+
"node": "16.18.1",
3232
"yarn": "1.22.19"
3333
},
3434
"workspaces": [

0 commit comments

Comments
 (0)