diff --git a/.github/workflows/setup-nextjs-build.yml b/.github/workflows/setup-nextjs-build.yml index 419c8c5b34713..c3b9911c792cb 100644 --- a/.github/workflows/setup-nextjs-build.yml +++ b/.github/workflows/setup-nextjs-build.yml @@ -8,6 +8,10 @@ on: # If not specified, will use latest release version including canary. version: type: string + nodeVersion: + required: false + description: 'version of Node.js to use' + type: string jobs: build_nextjs: @@ -16,6 +20,11 @@ jobs: outputs: output1: ${{ steps.build-next-swc-turbopack-patch.outputs.success }} steps: + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: ${{ inputs.nodeVersion || env.NODE_LTS_VERSION }} + check-latest: true - name: Get number of CPU cores uses: SimenB/github-actions-cpu-cores@v2 id: cpu-cores diff --git a/.github/workflows/turbopack-nextjs-build-integration-tests.yml b/.github/workflows/turbopack-nextjs-build-integration-tests.yml index 3701f1a51c89b..8042ca2be93e1 100644 --- a/.github/workflows/turbopack-nextjs-build-integration-tests.yml +++ b/.github/workflows/turbopack-nextjs-build-integration-tests.yml @@ -40,6 +40,7 @@ jobs: name: Setup Next.js build uses: ./.github/workflows/setup-nextjs-build.yml with: + nodeVersion: 18.18.2 version: ${{ inputs.version || 'canary' }} # Actual test scheduling. These jobs mimic the same jobs in Next.js repo, @@ -66,6 +67,11 @@ jobs: group: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12] steps: + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: 18.18.2 + check-latest: true - uses: actions/cache/restore@v3 id: restore-build with: @@ -112,6 +118,11 @@ jobs: group: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12] steps: + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: 18.18.2 + check-latest: true - uses: actions/cache/restore@v3 id: restore-build with: diff --git a/.github/workflows/turbopack-nextjs-dev-integration-tests.yml b/.github/workflows/turbopack-nextjs-dev-integration-tests.yml index 08d9dc6a82c3c..bb075cd3ac1aa 100644 --- a/.github/workflows/turbopack-nextjs-dev-integration-tests.yml +++ b/.github/workflows/turbopack-nextjs-dev-integration-tests.yml @@ -40,6 +40,7 @@ jobs: name: Setup Next.js build uses: ./.github/workflows/setup-nextjs-build.yml with: + nodeVersion: 18.18.2 version: ${{ inputs.version || 'canary' }} # Actual test scheduling. These jobs mimic the same jobs in Next.js repo, @@ -66,6 +67,11 @@ jobs: group: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12] steps: + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: 18.18.2 + check-latest: true - uses: actions/cache/restore@v3 id: restore-build with: @@ -112,6 +118,11 @@ jobs: group: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12] steps: + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: 18.18.2 + check-latest: true - uses: actions/cache/restore@v3 id: restore-build with: