Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(test): run all tests against node@21 #57057

Draft
wants to merge 3 commits into
base: canary
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/actions/next-stats-action/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ RUN apt install unzip wget curl nano htop screen build-essential pkg-config libs

RUN ln $(which python3) /usr/bin/python

RUN curl -sfLS https://install-node.vercel.app/v18.17.0 | bash -s -- -f
RUN curl -sfLS https://install-node.vercel.app/v21 | bash -s -- -f
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could make this come from an env variable so it always installs the same version as defined in the workflow with NODE_LTS_VERSION

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this might be risky if we're using apis that available in new nodejs version but not supported in 18. we had similar problem before that we were using api that not supported in 16 but available in 17 or 18

RUN corepack enable

WORKDIR /next-stats
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build_and_deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:
env:
NAPI_CLI_VERSION: 2.16.2
TURBO_VERSION: 1.10.9
NODE_LTS_VERSION: 20
NODE_LTS_VERSION: 21
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: 21 is not the LTS version, should we rename the variable to avoid ambiguity?

CARGO_PROFILE_RELEASE_LTO: 'true'
TURBO_TEAM: 'vercel'
TURBO_REMOTE_ONLY: 'true'
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/build_and_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:
env:
NAPI_CLI_VERSION: 2.14.7
TURBO_VERSION: 1.10.9
NODE_LTS_VERSION: 20
NODE_LTS_VERSION: 21
TEST_CONCURRENCY: 8
# disable backtrace for test snapshots
RUST_BACKTRACE: 0
Expand Down Expand Up @@ -146,7 +146,7 @@ jobs:
group: [1, 2, 3, 4, 5]
uses: ./.github/workflows/build_reusable.yml
with:
nodeVersion: 18.17.0
nodeVersion: 21
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
nodeVersion: 21
nodeVersion: ${{github.env.NODE_LTS_VERSION}}

skipForDocsOnly: 'yes'
afterBuild: RUST_BACKTRACE=0 NEXT_EXTERNAL_TESTS_FILTERS="$(pwd)/test/turbopack-tests-manifest.json" TURBOPACK=1 node run-tests.js --timings -g ${{ matrix.group }}/5 -c ${TEST_CONCURRENCY} --type integration
secrets: inherit
Expand Down Expand Up @@ -211,7 +211,7 @@ jobs:

uses: ./.github/workflows/build_reusable.yml
with:
nodeVersion: 18.17.0
nodeVersion: 21
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
nodeVersion: 21
nodeVersion: ${{github.env.NODE_LTS_VERSION}}

skipForDocsOnly: 'yes'
afterBuild: node run-tests.js --timings -g ${{ matrix.group }}/12 -c ${TEST_CONCURRENCY} --type integration
secrets: inherit
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build_reusable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ on:
env:
NAPI_CLI_VERSION: 2.14.7
TURBO_VERSION: 1.10.9
NODE_LTS_VERSION: 20
NODE_LTS_VERSION: 21
TEST_CONCURRENCY: 8
# disable backtrace for test snapshots
RUST_BACKTRACE: 0
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/code_freeze.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ name: Code Freeze
env:
NAPI_CLI_VERSION: 2.14.7
TURBO_VERSION: 1.10.9
NODE_LTS_VERSION: 20
NODE_LTS_VERSION: 21

jobs:
start:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pull_request_stats.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ name: Generate Pull Request Stats
env:
NAPI_CLI_VERSION: 2.14.7
TURBO_VERSION: 1.10.9
NODE_LTS_VERSION: 20
NODE_LTS_VERSION: 21
TEST_CONCURRENCY: 6

TURBO_TEAM: 'vercel'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test_e2e_deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
DATADOG_API_KEY: ${{ secrets.DATA_DOG_API_KEY }}
NAPI_CLI_VERSION: 2.16.2
TURBO_VERSION: 1.10.9
NODE_LTS_VERSION: 20
NODE_LTS_VERSION: 21
CARGO_PROFILE_RELEASE_LTO: 'true'
TURBO_TEAM: 'vercel'
TURBO_REMOTE_ONLY: 'true'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/trigger_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ name: Trigger Release
env:
NAPI_CLI_VERSION: 2.14.7
TURBO_VERSION: 1.10.9
NODE_LTS_VERSION: 20
NODE_LTS_VERSION: 21

jobs:
start:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/update_fonts_data.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:
workflow_dispatch:

env:
NODE_LTS_VERSION: 20
NODE_LTS_VERSION: 21

jobs:
create-pull-request:
Expand Down
2 changes: 1 addition & 1 deletion azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ pr:
variables:
PNPM_CACHE_FOLDER: $(Pipeline.Workspace)/.pnpm-store
NEXT_TELEMETRY_DISABLED: '1'
node_version: ^18.17.0
node_version: ^21

stages:
- stage: Test
Expand Down
2 changes: 1 addition & 1 deletion test/integration/hydrate-then-render/pages/_app.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/* eslint-disable camelcase */
import App from 'next/app'

if (typeof navigator !== 'undefined') {
if (typeof window !== 'undefined' && typeof navigator !== 'undefined') {
window.__BEACONS = window.__BEACONS || []

navigator.sendBeacon = async function () {
Expand Down
2 changes: 1 addition & 1 deletion test/integration/relay-analytics-disabled/pages/index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
if (typeof navigator !== 'undefined') {
if (typeof window !== 'undefined' && typeof navigator !== 'undefined') {
window.__BEACONS = window.__BEACONS || []

navigator.sendBeacon = async function () {
Expand Down
2 changes: 1 addition & 1 deletion test/integration/relay-analytics/pages/index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
if (typeof navigator !== 'undefined') {
if (typeof window !== 'undefined' && typeof navigator !== 'undefined') {
window.__BEACONS = window.__BEACONS || []
window.__BEACONS_COUNT = new Map()

Expand Down
Loading