Repository navigation
fix: prevent fetch wrapper chains across dev server reloads #35081
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CI | |
| on: | |
| push: | |
| branches: | |
| - main | |
| paths-ignore: &paths_ignore | |
| - '.changeset/**' | |
| - '.githooks/**' | |
| - '.github/ISSUE_TEMPLATE/**' | |
| - '.github/copilot-instructions.md' | |
| - '.github/FUNDING.yml' | |
| - '.github/PULL_REQUEST_TEMPLATE.md' | |
| - 'documentation/**' | |
| - 'packages/*/CHANGELOG*.md' | |
| - 'packages/kit/src/types/synthetic/**' | |
| - 'AGENTS.md' | |
| - 'CLAUDE.md' | |
| - 'CONTRIBUTING.md' | |
| - 'FUNDING.json' | |
| - 'LICENSE' | |
| - 'README.md' | |
| - '.coderabbit.yml' | |
| pull_request: | |
| paths-ignore: *paths_ignore | |
| env: | |
| # we call `pnpm playwright install` instead | |
| PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: '1' | |
| # dedupe push/pull_request runs for the same ref and cancel superseded runs | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.head_ref || github.ref }} | |
| cancel-in-progress: true | |
| permissions: | |
| contents: read # to fetch code (actions/checkout) | |
| jobs: | |
| lint-all: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| with: | |
| persist-credentials: false | |
| - uses: ./.github/actions/node-setup | |
| - run: pnpm run lint | |
| - run: cd packages/kit && pnpm prepublishOnly && { [ "`git status --porcelain=v1`" == "" ] || (echo "Generated types or messages have changed — please run prepublishOnly locally and commit the changes after you have reviewed them"; git diff; exit 1); } | |
| - run: pnpm run check | |
| test: | |
| # unit tests for kit and every other package; `script` is a root package.json script | |
| runs-on: ${{ matrix.os || 'ubuntu-latest' }} | |
| timeout-minutes: 30 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - { script: 'test:kit:unit', node-version: 22 } | |
| - { script: 'test:kit:unit', node-version: 24 } | |
| - { script: 'test:kit:unit', node-version: 24, os: windows-latest } | |
| - { script: 'test:others', node-version: 22 } | |
| - { script: 'test:others', node-version: 24 } | |
| - { script: 'test:others:unit', node-version: 24, os: windows-latest } | |
| steps: | |
| - run: git config --global core.autocrlf false | |
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| with: | |
| persist-credentials: false | |
| - uses: ./.github/actions/node-setup | |
| with: | |
| node-version: ${{ matrix.node-version }} | |
| # the adapter-bun unit tests run under `bun test` | |
| - uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2.2.0 | |
| if: matrix.script == 'test:others' | |
| with: | |
| bun-version: 1.4.3 | |
| - run: pnpm run sync-all | |
| - run: pnpm ${{ matrix.script }} | |
| e2e: | |
| # every Playwright leg; `script` is a root package.json script, see test/utils.js for the env | |
| runs-on: ${{ matrix.os || 'ubuntu-latest' }} | |
| timeout-minutes: 30 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| # basics is the biggest app: its js project is sharded and its no-js project runs | |
| # alone; the other apps boot once in the `rest` legs | |
| - { script: 'test:kit:dev:basics', project: 'js', shard: '1/2' } | |
| - { script: 'test:kit:dev:basics', project: 'js', shard: '2/2' } | |
| - { script: 'test:kit:dev:basics', project: 'no-js' } | |
| - { script: 'test:kit:dev:rest', workers: 2 } | |
| - { script: 'test:kit:build:basics', project: 'js', shard: '1/2' } | |
| - { script: 'test:kit:build:basics', project: 'js', shard: '2/2' } | |
| - { script: 'test:kit:build:basics', project: 'no-js' } | |
| - { script: 'test:kit:build:rest', workers: 2 } | |
| # basics again with SVELTE_ASYNC=true | |
| - { script: 'test:svelte-async:dev', project: 'js', shard: '1/2' } | |
| - { script: 'test:svelte-async:dev', project: 'js', shard: '2/2' } | |
| - { script: 'test:svelte-async:dev', project: 'no-js' } | |
| - { script: 'test:svelte-async:build', project: 'js', shard: '1/2' } | |
| - { script: 'test:svelte-async:build', project: 'js', shard: '2/2' } | |
| - { script: 'test:svelte-async:build', project: 'no-js' } | |
| # basics and options with ROUTER_RESOLUTION=server | |
| - { script: 'test:server-side-route-resolution:dev', project: 'js', shard: '1/2' } | |
| - { script: 'test:server-side-route-resolution:dev', project: 'js', shard: '2/2' } | |
| - { script: 'test:server-side-route-resolution:dev', project: 'no-js' } | |
| - { script: 'test:server-side-route-resolution:build', project: 'js', shard: '1/2' } | |
| - { script: 'test:server-side-route-resolution:build', project: 'js', shard: '2/2' } | |
| - { script: 'test:server-side-route-resolution:build', project: 'no-js' } | |
| # the cross-platform subset of basics on the other browsers and operating systems | |
| - { script: 'test:cross-platform:dev', os: windows-latest, workers: 2 } | |
| - { script: 'test:cross-platform:build', os: windows-latest, workers: 2 } | |
| - { script: 'test:cross-platform:dev', browser: firefox } | |
| - { script: 'test:cross-platform:build', browser: firefox } | |
| - { script: 'test:cross-platform:dev', os: macOS-latest, browser: webkit, workers: 3 } | |
| - { script: 'test:cross-platform:build', os: macOS-latest, browser: webkit, workers: 3 } | |
| # `vite` swaps in a pnpm-workspace.yaml catalog, e.g. to test a beta | |
| # - { script: 'test:kit:dev:basics', vite: 'beta' } | |
| env: | |
| KIT_E2E_BROWSER: ${{ matrix.browser || 'chromium' }} | |
| KIT_E2E_WORKERS: ${{ matrix.workers || 4 }} | |
| KIT_E2E_SHARD: ${{ matrix.shard }} | |
| KIT_E2E_PROJECT: ${{ matrix.project }} | |
| steps: | |
| - run: git config --global core.autocrlf false | |
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| with: | |
| persist-credentials: false | |
| - uses: ./.github/actions/node-setup | |
| - name: setup overrides for matrix.vite | |
| if: matrix.vite | |
| run: | # copies catalogs.vite-xxx to overrides in pnpm-workspace.yaml so the subsequent `pnpm install` enforces them | |
| yq -i '.overrides =.catalogs."vite-${{ matrix.vite }}"' pnpm-workspace.yaml | |
| pnpm install --no-frozen-lockfile | |
| git checkout pnpm-lock.yaml pnpm-workspace.yaml # revert changes to pnpm files to avoid cache key changes | |
| pnpm --dir packages/kit ls vite | |
| - if: matrix.browser && matrix.browser != 'chromium' | |
| uses: ./.github/actions/playwright-setup | |
| with: | |
| os: ${{ matrix.os || 'ubuntu-latest' }} | |
| e2e-browser: ${{ matrix.browser }} | |
| - run: pnpm run sync-all | |
| - run: pnpm ${{ matrix.script }} | |
| - name: Print flaky test report | |
| run: node scripts/print-flaky-test-report.js | |
| - name: Archive test results | |
| if: failure() | |
| shell: bash | |
| run: find packages -type d -name test-results -not -empty | tar -czf test-results.tar.gz --files-from=- | |
| - name: Upload test results | |
| if: failure() | |
| uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2 | |
| with: | |
| retention-days: 3 | |
| name: test-failure-${{ github.run_id }}-${{ strategy.job-index }} | |
| path: test-results.tar.gz |