diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 23c53cc6cb9b..90c152943178 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,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: @@ -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: @@ -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: @@ -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: @@ -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: @@ -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: @@ -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: @@ -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: @@ -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: @@ -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: | 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' 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": [