From 9d2e65d50c6d91e6f0d6095490c30116780942ac Mon Sep 17 00:00:00 2001 From: Francesco Novy Date: Fri, 18 Nov 2022 10:22:44 +0100 Subject: [PATCH 1/3] build: bump internal node version from 14.x to 16.x --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 088862bffd5e..7692a98d42c4 100644 --- a/package.json +++ b/package.json @@ -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": [ From e0d0293b36e5e074f968a7b503bffefd41aaad64 Mon Sep 17 00:00:00 2001 From: Francesco Novy Date: Fri, 18 Nov 2022 10:25:02 +0100 Subject: [PATCH 2/3] ci: Use node 16 to build on CI --- .github/workflows/build.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 571f948519ea..e061712e8101 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -165,8 +165,7 @@ jobs: - 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' + node-version: ${{ env.DEFAULT_NODE_VERSION }} - name: Check dependency cache uses: actions/cache@v3 with: From a98d932f0dbf1e8f6d0a77dcf425b5e72f7ec0f4 Mon Sep 17 00:00:00 2001 From: Francesco Novy Date: Fri, 18 Nov 2022 10:31:02 +0100 Subject: [PATCH 3/3] ci: Make CI use volta to install dependencies --- .github/workflows/build.yml | 49 +++++++++++------------------------- .github/workflows/canary.yml | 11 ++++---- 2 files changed, 21 insertions(+), 39 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index e061712e8101..4a24826f698d 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -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: | @@ -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 @@ -163,9 +158,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: @@ -201,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: @@ -281,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: @@ -308,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: @@ -336,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: @@ -508,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: @@ -549,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: @@ -581,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: @@ -688,9 +667,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: @@ -701,9 +678,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: | diff --git a/.github/workflows/canary.yml b/.github/workflows/canary.yml index 2e431e0f7359..9824b1060618 100644 --- a/.github/workflows/canary.yml +++ b/.github/workflows/canary.yml @@ -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'