Skip to content

Commit

Permalink
build: Update (internal) node version to 16.x (#6236)
Browse files Browse the repository at this point in the history
  • Loading branch information
mydea committed Nov 21, 2022
1 parent 9e6fd1a commit b9dbc39
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 41 deletions.
50 changes: 15 additions & 35 deletions .github/workflows/build.yml
Expand Up @@ -18,9 +18,6 @@ concurrency:
cancel-in-progress: true

env:
# We pin the exact version to enforce reproducable builds with node + npm.
DEFAULT_NODE_VERSION: '16.15.1'

HEAD_COMMIT: ${{ github.event.inputs.commit || github.sha }}

CACHED_DEPENDENCY_PATHS: |
Expand Down Expand Up @@ -132,9 +129,7 @@ jobs:
with:
ref: ${{ env.HEAD_COMMIT }}
- name: Set up Node
uses: actions/setup-node@v3
with:
node-version: ${{ env.DEFAULT_NODE_VERSION }}
uses: volta-cli/action@v4
# we use a hash of yarn.lock as our cache key, because if it hasn't changed, our dependencies haven't changed,
# so no need to reinstall them
- name: Compute dependency cache key
Expand Down Expand Up @@ -163,10 +158,7 @@ jobs:
with:
ref: ${{ env.HEAD_COMMIT }}
- name: Set up Node
uses: actions/setup-node@v3
with:
# ember won't build under node 16, at least not with the versions of the ember build tools we use
node-version: '14'
uses: volta-cli/action@v4
- name: Check dependency cache
uses: actions/cache@v3
with:
Expand Down Expand Up @@ -202,9 +194,7 @@ jobs:
with:
ref: ${{ env.HEAD_COMMIT }}
- name: Set up Node
uses: actions/setup-node@v3
with:
node-version: ${{ env.DEFAULT_NODE_VERSION }}
uses: volta-cli/action@v4
- name: Check dependency cache
uses: actions/cache@v3
with:
Expand Down Expand Up @@ -282,9 +272,7 @@ jobs:
with:
ref: ${{ env.HEAD_COMMIT }}
- name: Set up Node
uses: actions/setup-node@v3
with:
node-version: ${{ env.DEFAULT_NODE_VERSION }}
uses: volta-cli/action@v4
- name: Check dependency cache
uses: actions/cache@v3
with:
Expand All @@ -309,9 +297,7 @@ jobs:
with:
ref: ${{ env.HEAD_COMMIT }}
- name: Set up Node
uses: actions/setup-node@v3
with:
node-version: ${{ env.DEFAULT_NODE_VERSION }}
uses: volta-cli/action@v4
- name: Check dependency cache
uses: actions/cache@v3
with:
Expand All @@ -337,9 +323,7 @@ jobs:
with:
ref: ${{ env.HEAD_COMMIT }}
- name: Set up Node
uses: actions/setup-node@v3
with:
node-version: ${{ env.DEFAULT_NODE_VERSION }}
uses: volta-cli/action@v4
- name: Check dependency cache
uses: actions/cache@v3
with:
Expand Down Expand Up @@ -509,9 +493,7 @@ jobs:
with:
ref: ${{ env.HEAD_COMMIT }}
- name: Set up Node
uses: actions/setup-node@v3
with:
node-version: ${{ env.DEFAULT_NODE_VERSION }}
uses: volta-cli/action@v4
- name: Check dependency cache
uses: actions/cache@v3
with:
Expand Down Expand Up @@ -550,9 +532,7 @@ jobs:
with:
ref: ${{ env.HEAD_COMMIT }}
- name: Set up Node
uses: actions/setup-node@v3
with:
node-version: ${{ env.DEFAULT_NODE_VERSION }}
uses: volta-cli/action@v4
- name: Check dependency cache
uses: actions/cache@v3
with:
Expand Down Expand Up @@ -582,9 +562,7 @@ jobs:
with:
ref: ${{ env.HEAD_COMMIT }}
- name: Set up Node
uses: actions/setup-node@v3
with:
node-version: ${{ env.DEFAULT_NODE_VERSION }}
uses: volta-cli/action@v4
- name: Check dependency cache
uses: actions/cache@v3
with:
Expand Down Expand Up @@ -692,9 +670,7 @@ jobs:
with:
ref: ${{ env.HEAD_COMMIT }}
- name: Set up Node
uses: actions/setup-node@v3
with:
node-version: ${{ env.DEFAULT_NODE_VERSION }}
uses: volta-cli/action@v4
- name: Check dependency cache
uses: actions/cache@v3
with:
Expand All @@ -705,9 +681,13 @@ jobs:
with:
path: ${{ env.CACHED_BUILD_PATHS }}
key: ${{ env.BUILD_CACHE_KEY }}
- name: Get node version
id: versions
run: |
echo "echo node=$(jq -r '.volta.node' package.json)" >> $GITHUB_OUTPUT
- name: Run E2E tests
env:
E2E_TEST_PUBLISH_SCRIPT_NODE_VERSION: ${{ env.DEFAULT_NODE_VERSION }}
E2E_TEST_PUBLISH_SCRIPT_NODE_VERSION: ${{ steps.versions.outputs.node }}
E2E_TEST_AUTH_TOKEN: ${{ secrets.E2E_TEST_AUTH_TOKEN }}
E2E_TEST_DSN: ${{ secrets.E2E_TEST_DSN }}
run: |
Expand Down
11 changes: 6 additions & 5 deletions .github/workflows/canary.yml
Expand Up @@ -27,17 +27,18 @@ jobs:
with:
ref: ${{ env.HEAD_COMMIT }}
- name: Set up Node
uses: actions/setup-node@v3
with:
# ember won't build under node 16, at least not with the versions of the ember build tools we use
node-version: 14
uses: volta-cli/action@v4
- name: Install dependencies
run: yarn install --ignore-engines --frozen-lockfile
- name: Build packages
run: yarn build
- name: Get node version
id: versions
run: |
echo "echo node=$(jq -r '.volta.node' package.json)" >> $GITHUB_OUTPUT
- name: Run Canary Tests
env:
E2E_TEST_PUBLISH_SCRIPT_NODE_VERSION: ${{ env.DEFAULT_NODE_VERSION }}
E2E_TEST_PUBLISH_SCRIPT_NODE_VERSION: ${{ steps.versions.outputs.node }}
E2E_TEST_AUTH_TOKEN: ${{ secrets.E2E_TEST_AUTH_TOKEN }}
E2E_TEST_DSN: ${{ secrets.E2E_TEST_DSN }}
CANARY_E2E_TEST: 'yes'
Expand Down
2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -28,7 +28,7 @@
"test-ci": "ts-node ./scripts/test.ts"
},
"volta": {
"node": "14.17.0",
"node": "16.18.1",
"yarn": "1.22.19"
},
"workspaces": [
Expand Down

0 comments on commit b9dbc39

Please sign in to comment.