feat: use goto for shallow routing, deprecate push/replaceState
#31497
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: | |
| - version-3 | |
| 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' | |
| 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 have changed — please run prepublishOnly locally and commit the changes after you have reviewed them"; git diff; exit 1); } | |
| - run: pnpm run check | |
| test-kit: | |
| runs-on: ${{ matrix.os }} | |
| timeout-minutes: 30 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - node-version: 22 | |
| os: ubuntu-latest | |
| e2e-browser: 'chromium' | |
| vite: 'current' | |
| - node-version: 24 | |
| os: ubuntu-latest | |
| e2e-browser: 'chromium' | |
| vite: 'current' | |
| # - node-version: 24 | |
| # os: ubuntu-latest | |
| # e2e-browser: 'chromium' | |
| # vite: 'beta' | |
| env: | |
| KIT_E2E_BROWSER: ${{matrix.e2e-browser}} | |
| MATRIX_VITE: ${{matrix.vite}} | |
| 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 }} | |
| - name: setup overrides for matrix.vite | |
| if: matrix.vite != 'current' | |
| 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 | |
| - uses: ./.github/actions/playwright-setup | |
| with: | |
| os: ${{ matrix.os }} | |
| e2e-browser: ${{ matrix.e2e-browser }} | |
| - run: pnpm run sync-all | |
| - run: pnpm test:kit | |
| - 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@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 | |
| with: | |
| retention-days: 3 | |
| name: test-failure-${{ github.run_id }}-${{ matrix.os }}-${{ matrix.node-version }}-${{ matrix.e2e-browser }}-vite-${{matrix.vite}} | |
| path: test-results.tar.gz | |
| test-kit-cross-browser: | |
| runs-on: ${{ matrix.os }} | |
| timeout-minutes: 30 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - node-version: 24 | |
| os: windows-latest | |
| e2e-browser: 'chromium' | |
| mode: 'dev' | |
| - node-version: 24 | |
| os: ubuntu-latest | |
| e2e-browser: 'firefox' | |
| mode: 'dev' | |
| - node-version: 24 | |
| os: macOS-latest | |
| e2e-browser: 'webkit' | |
| mode: 'dev' | |
| - node-version: 24 | |
| os: windows-latest | |
| e2e-browser: 'chromium' | |
| mode: 'build' | |
| - node-version: 24 | |
| os: ubuntu-latest | |
| e2e-browser: 'firefox' | |
| mode: 'build' | |
| - node-version: 24 | |
| os: macOS-latest | |
| e2e-browser: 'webkit' | |
| mode: 'build' | |
| env: | |
| KIT_E2E_BROWSER: ${{ matrix.e2e-browser }} | |
| 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 }} | |
| - uses: ./.github/actions/playwright-setup | |
| with: | |
| os: ${{ matrix.os }} | |
| e2e-browser: ${{ matrix.e2e-browser }} | |
| - run: pnpm run sync-all | |
| - run: pnpm test:cross-platform:${{ matrix.mode }} | |
| - 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-cross-platform-${{ matrix.mode }}.tar.gz --files-from=- | |
| - name: Upload test results | |
| if: failure() | |
| uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 | |
| with: | |
| retention-days: 3 | |
| name: test-failure-cross-platform-${{ matrix.mode }}-${{ github.run_id }}-${{ matrix.os }}-${{ matrix.node-version }}-${{ matrix.e2e-browser }} | |
| path: test-results-cross-platform-${{ matrix.mode }}.tar.gz | |
| test-kit-server-side-route-resolution: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 30 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - mode: 'dev' | |
| - mode: 'build' | |
| steps: | |
| - run: git config --global core.autocrlf false | |
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| with: | |
| persist-credentials: false | |
| - uses: ./.github/actions/node-setup | |
| - uses: ./.github/actions/playwright-setup | |
| - run: pnpm run sync-all | |
| - run: pnpm test:server-side-route-resolution:${{ matrix.mode }} | |
| - 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-server-side-route-resolution-${{ matrix.mode }}.tar.gz --files-from=- | |
| - name: Upload test results | |
| if: failure() | |
| uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 | |
| with: | |
| retention-days: 3 | |
| name: test-failure-server-side-route-resolution-${{ matrix.mode }}-${{ github.run_id }} | |
| path: test-results-server-side-route-resolution-${{ matrix.mode }}.tar.gz | |
| test-kit-svelte-async: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 30 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - mode: 'dev' | |
| - mode: 'build' | |
| 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 }} | |
| - uses: ./.github/actions/playwright-setup | |
| - run: pnpm run sync-all | |
| - run: pnpm test:svelte-async:${{ matrix.mode }} | |
| - 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-svelte-async-${{ matrix.mode }}.tar.gz --files-from=- | |
| - name: Upload test results | |
| if: failure() | |
| uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 | |
| with: | |
| retention-days: 3 | |
| name: test-failure-svelte-async-${{ matrix.mode }}-${{ github.run_id }} | |
| path: test-results-svelte-async-${{ matrix.mode }}.tar.gz | |
| test-others: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| node-version: [22, 24] | |
| steps: | |
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| with: | |
| persist-credentials: false | |
| - uses: ./.github/actions/node-setup | |
| with: | |
| node-version: ${{ matrix.node-version }} | |
| - uses: ./.github/actions/playwright-setup | |
| - run: cd packages/kit && pnpm prepublishOnly | |
| - run: pnpm run test:others |