Skip to content

fix(deps): update netlify packages (major) #12831

fix(deps): update netlify packages (major)

fix(deps): update netlify packages (major) #12831

---
name: Integration Tests
on:
pull_request:
branches: ['**']
jobs:
setup:
name: Setup
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.matrix.outputs.value }}
has-code-changes: ${{ steps.filter.outputs.code || 'true' }}
steps:
- name: Git checkout
uses: actions/checkout@v6
- name: Detect code changes
uses: dorny/paths-filter@v3
if: github.event_name == 'pull_request'
id: filter
with:
filters: |
code:
- '**'
- '!**/*.md'
- '!LICENSE'
- '!docs/**'
- '!.vale.ini'
- '!.github/ISSUE_TEMPLATE/**'
- '!.github/PULL_REQUEST_TEMPLATE.md'
- name: Compute matrix
id: matrix
env:
HEAD_REF: ${{ github.head_ref }}
run: |
node_versions=$(yq eval '.node_versions | join(" ")' .github/test-matrix.yml)
extra_oses=$(yq eval '.extra_oses_on_release | join(" ")' .github/test-matrix.yml)
primary=$(yq eval '.primary_node_version' .github/test-matrix.yml)
OS_NODE=()
for node in $node_versions; do
OS_NODE+=("ubuntu-latest:$node")
done
if [[ "$HEAD_REF" == release-please--* ]]; then
for os in $extra_oses; do
OS_NODE+=("$os:$primary")
done
fi
entries=()
for combo in "${OS_NODE[@]}"; do
os="${combo%:*}"
node="${combo##*:}"
# Resolve install version via override map; fall back to the
# display value when no override is set.
install=$(yq eval ".node_install_overrides[\"$node\"] // \"$node\"" .github/test-matrix.yml)
for shard in "1/4" "2/4" "3/4" "4/4"; do
entries+=("{\"os\":\"$os\",\"node-version\":\"$node\",\"node-install-version\":\"$install\",\"shard\":\"$shard\"}")
done
done
joined=$(IFS=,; echo "${entries[*]}")
echo "value={\"include\":[$joined]}" >> "$GITHUB_OUTPUT"
integration:
name: Integration
needs: setup
if: needs.setup.outputs.has-code-changes == 'true'
runs-on: ${{ matrix.os }}
timeout-minutes: 40
strategy:
fail-fast: false
matrix: ${{ fromJson(needs.setup.outputs.matrix) }}
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
if: "${{ matrix.os == 'windows-2025' }}"
- name: Git checkout
uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Use Node.js ${{ matrix.node-install-version }}
uses: actions/setup-node@v6
with:
node-version: ${{ matrix.node-install-version }}
cache: npm
check-latest: false
- name: Install PNPM
run: |
corepack enable
corepack prepare pnpm@9.14.2 --activate
- name: Setup Deno
uses: denoland/setup-deno@v1
with:
deno-version: 2.6.6
- 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 run test:integration -- --coverage --shard=${{ matrix.shard }}
env:
NETLIFY_TEST_ACCOUNT_SLUG: 'netlify-integration-testing'
# PRs from forks don't have access to this secret, which
# may be used by some tests.
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN || 'fake-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=${{ matrix.os }}
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: Sanitize shard for artefact name
id: sanitize-shard-name
run: echo "shard=$(echo '${{ matrix.shard }}' | tr '/' '-')" >> $GITHUB_OUTPUT
- name: Store npm error artefacts
uses: actions/upload-artifact@v6
if: always()
with:
name: npm-logs--${{ matrix.os }}--${{ matrix.node-version }}--${{ steps.sanitize-shard-name.outputs.shard }}
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 }}
status:
name: Integration Tests Status
needs: [setup, integration]
if: always()
runs-on: ubuntu-latest
steps:
- name: Verify result
run: |
if [[ "${{ needs.setup.result }}" != "success" ]]; then
echo "Setup job failed"
exit 1
fi
if [[ "${{ needs.integration.result }}" == "failure" || "${{ needs.integration.result }}" == "cancelled" ]]; then
echo "Integration tests failed"
exit 1
fi