diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml index 7505e7a5de8..755dd7bdb00 100644 --- a/.github/workflows/benchmark.yml +++ b/.github/workflows/benchmark.yml @@ -17,7 +17,7 @@ jobs: - name: Use Node.js uses: actions/setup-node@v4 with: - node-version: lts/* + node-version: latest cache: npm - name: Install dependencies diff --git a/.github/workflows/e2e-tests.yml b/.github/workflows/e2e-tests.yml index 2e42c6aad99..895c2adc0f7 100644 --- a/.github/workflows/e2e-tests.yml +++ b/.github/workflows/e2e-tests.yml @@ -20,8 +20,7 @@ jobs: strategy: matrix: os: [windows-latest] - # Pinning 20.x version as a temporary workaround due to this https://github.com/nodejs/node/issues/52884 - node-version: ['18.14.0', '20.12.2', '22'] + node-version: ['18.14.0', '20', '22', '24.0.0-rc.2'] fail-fast: false steps: # This improves Windows network performance. We need this since we open many ports in our tests. @@ -47,7 +46,7 @@ jobs: version: 10 - name: Install dependencies - run: npm ci --no-audit + run: npm ci --ignore-scripts --no-audit - name: Build project run: npm run build @@ -79,7 +78,7 @@ jobs: strategy: matrix: os: [ubuntu-latest, macOS-latest] - node-version: ['18.14.0', '*'] + node-version: ['18.14.0', '22', '24.0.0-rc.2'] fail-fast: false steps: - name: Git checkout @@ -99,7 +98,7 @@ jobs: version: 10 - name: Install dependencies - run: npm ci --no-audit + run: npm ci --ignore-scripts --no-audit - name: Build project run: npm run build diff --git a/.github/workflows/format.yml b/.github/workflows/format.yml index 0cc0a79a21f..126208588a6 100644 --- a/.github/workflows/format.yml +++ b/.github/workflows/format.yml @@ -19,7 +19,7 @@ jobs: - uses: actions/setup-node@v4 with: - node-version: 18.14.0 + node-version: latest cache: npm - name: Install dependencies diff --git a/.github/workflows/integration-tests.yml b/.github/workflows/integration-tests.yml index 0acdd65b6ed..6a44360a0d9 100644 --- a/.github/workflows/integration-tests.yml +++ b/.github/workflows/integration-tests.yml @@ -18,10 +18,11 @@ jobs: strategy: matrix: os: [ubuntu-latest, macOS-latest, windows-latest] - # Pinning 20.x version as a temporary workaround due to this https://github.com/nodejs/node/issues/52884 - node-version: ['18.17.0', '20.12.2', '22'] + # TODO(serhalp): Document why we test against 18.17.0 here (18.14.0 is our minimum supported version) + node-version: ['18.17.0', '20', '22', '24.0.0-rc.2'] shard: ['1/4', '2/4', '3/4', '4/4'] + # TODO(serhalp): Why are these excluded? Document, fix, or remove. exclude: - os: macOS-latest node-version: '18.17.0' @@ -61,7 +62,7 @@ jobs: deno-version: v1.44.4 - name: Install core dependencies - run: npm ci --no-audit + run: npm ci --ignore-scripts --no-audit - name: Build project run: npm run build @@ -113,87 +114,3 @@ jobs: with: flags: ${{ steps.test-coverage-flags.outputs.os }},${{ steps.test-coverage-flags.outputs.node }} token: ${{ secrets.CODECOV_TOKEN }} - # Specific tests for known test that failed on windows using node 23. - # Can be replaced with larger node 23 tests in the future. - integration-win-node-23: - name: Integration test windows latest node23 specific - runs-on: windows-latest - timeout-minutes: 40 - steps: - # This improves Windows network performance, we need this since we open many ports in our tests - - name: Increase Windows port limit and reduce time wait delay - run: | - netsh int ipv4 set dynamicport tcp start=1025 num=64511 - REG ADD HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\TCPIP\Parameters /v TcpTimedWaitDelay /t REG_DWORD /d 30 /f - - - name: Git checkout - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - - name: Use Node.js - uses: actions/setup-node@v4 - with: - node-version: '23.x' - cache: npm - check-latest: true - - - name: Install PNPM - run: | - corepack enable - corepack prepare pnpm@9.14.2 --activate - - - name: Setup Deno - uses: denoland/setup-deno@v1 - with: - deno-version: v1.44.4 - - - name: Install core dependencies - run: npm ci --no-audit - - - name: Build project - run: npm run build - if: '${{!steps.release-check.outputs.IS_RELEASE}}' - - - name: Prepare tests - run: npm run test:init - - - name: Tests - run: npm exec vitest -- run tests/integration/commands/dev/dev.test.ts --coverage - env: - # GitHub secrets are not available when running on PR from forks - # We set a flag so we can skip tests that access Netlify API - NETLIFY_TEST_DISABLE_LIVE: - ${{ github.event_name == 'pull_request' && github.event.pull_request.head.repo.fork == true }} - NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }} - # NETLIFY_TEST_GITHUB_TOKEN is used to avoid reaching GitHub API limits in exec-fetcher.js - NETLIFY_TEST_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - # Changes the polling interval used by the file watcher - CHOKIDAR_INTERVAL: 20 - CHOKIDAR_USEPOLLING: 1 - - - name: Get test coverage flags - id: test-coverage-flags - # For windows we have to use $env: - run: |- - os=windows-latest - node=$(node --version) - echo "os=${os/-latest/}" >> $GITHUB_OUTPUT - echo "os=${os/-latest/}" >> $env:GITHUB_OUTPUT - echo "node=node_${node/.*.*/}" >> $GITHUB_OUTPUT - echo "node=node_${node/.*.*/}" >> $env:GITHUB_OUTPUT - shell: bash - - - name: Store npm error artefacts - uses: actions/upload-artifact@v4 - if: always() - with: - name: npm-logs--windows-latest--23x - path: | - ~/.npm/_logs/**/* - - - uses: codecov/codecov-action@v5 - continue-on-error: true - with: - flags: ${{ steps.test-coverage-flags.outputs.os }},${{ steps.test-coverage-flags.outputs.node }} - token: ${{ secrets.CODECOV_TOKEN }} diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index e9350094091..82fc5719df3 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -19,7 +19,7 @@ jobs: - uses: actions/setup-node@v4 with: - node-version: 18.14.0 + node-version: latest cache: npm - name: Install dependencies diff --git a/.github/workflows/pre-release-sha.yml b/.github/workflows/pre-release-sha.yml index d533b6c33eb..afcf2ed2fea 100644 --- a/.github/workflows/pre-release-sha.yml +++ b/.github/workflows/pre-release-sha.yml @@ -22,7 +22,7 @@ jobs: - uses: actions/setup-node@v4 with: - node-version: '18.17.0' + node-version: latest cache: npm registry-url: 'https://registry.npmjs.org' diff --git a/.github/workflows/pre-release.yml b/.github/workflows/pre-release.yml index 4ea7750748a..72bb04bd844 100644 --- a/.github/workflows/pre-release.yml +++ b/.github/workflows/pre-release.yml @@ -16,7 +16,7 @@ jobs: - uses: actions/setup-node@v4 with: - node-version: lts/* + node-version: latest cache: npm registry-url: 'https://registry.npmjs.org' diff --git a/.github/workflows/release-please.yml b/.github/workflows/release-please.yml index e8ebfae270d..bde549b0ab2 100644 --- a/.github/workflows/release-please.yml +++ b/.github/workflows/release-please.yml @@ -36,7 +36,7 @@ jobs: - uses: actions/setup-node@v4 with: - node-version: lts/* + node-version: latest cache: npm registry-url: 'https://registry.npmjs.org' diff --git a/.github/workflows/typecheck.yml b/.github/workflows/typecheck.yml index ad7772fc2fb..a75d4fc455a 100644 --- a/.github/workflows/typecheck.yml +++ b/.github/workflows/typecheck.yml @@ -18,7 +18,7 @@ jobs: - uses: actions/setup-node@v4 with: - node-version: 18.14.0 + node-version: latest cache: npm - name: Install dependencies diff --git a/.github/workflows/unit-tests.yml b/.github/workflows/unit-tests.yml index d141c12e881..d2e746a2c58 100644 --- a/.github/workflows/unit-tests.yml +++ b/.github/workflows/unit-tests.yml @@ -17,10 +17,11 @@ jobs: strategy: matrix: os: [ubuntu-latest, macOS-latest, windows-latest] - node-version: ['18.14.0', '22.x'] + node-version: ['18.14.0', '22', '24.0.0-rc.2'] + # TODO(serhalp): Why is this excluded? Document, fix, or remove. exclude: - os: windows-latest - node-version: '22.x' + node-version: '22' fail-fast: false steps: - name: Git checkout @@ -34,7 +35,7 @@ jobs: check-latest: true - name: Install core dependencies - run: npm ci --no-audit + run: npm ci --ignore-scripts --no-audit - name: Build project run: npm run build diff --git a/.github/workflows/verify-docs.yml b/.github/workflows/verify-docs.yml index b5018d2ca68..2782199e2ca 100644 --- a/.github/workflows/verify-docs.yml +++ b/.github/workflows/verify-docs.yml @@ -19,7 +19,7 @@ jobs: - uses: actions/setup-node@v4 with: - node-version: lts/* + node-version: latest cache: npm - name: Install dependencies