-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
chore: test matrix dimension for vite #15208
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
Changes from all commits
65ca241
1b7404b
a14cdf6
9fd05df
6580571
05baea8
ae7d6d1
5588e6f
3496c21
3815483
f294dc0
367d88a
1e6e37d
710e60a
59922ca
d15c494
53f748a
dbe2945
8be7f02
4b5500f
10bf2f4
46e0186
d946e80
88c31a2
1afe3dc
f5c5de8
4c1dfbb
cc22b8b
07365e1
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -54,17 +54,26 @@ jobs: | |
| - node-version: 18 | ||
| os: ubuntu-latest | ||
| e2e-browser: 'chromium' | ||
| vite: 'baseline' | ||
| - node-version: 20 | ||
| os: ubuntu-latest | ||
| e2e-browser: 'chromium' | ||
| vite: 'current' | ||
| - 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@v6 | ||
|
|
@@ -74,6 +83,13 @@ jobs: | |
| node-version: ${{ matrix.node-version }} | ||
| cache: pnpm | ||
| - run: pnpm install --frozen-lockfile | ||
| - 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 | ||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. yq is available on github hosted runners (except windows) and allows in place editing of yaml this code copies a block of |
||
| 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 | ||
| - run: pnpm playwright install ${{ matrix.e2e-browser }} | ||
| - run: pnpm run sync-all | ||
| - run: pnpm test:kit | ||
|
|
@@ -90,7 +106,7 @@ jobs: | |
| uses: actions/upload-artifact@v6 | ||
| with: | ||
| retention-days: 3 | ||
| name: test-failure-${{ github.run_id }}-${{ matrix.os }}-${{ matrix.node-version }}-${{ matrix.e2e-browser }} | ||
| 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 }} | ||
|
|
@@ -99,27 +115,27 @@ jobs: | |
| fail-fast: false | ||
| matrix: | ||
| include: | ||
| - node-version: 18 | ||
| - node-version: 24 | ||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. node 18 caused build fails with newer versions of vite-plugin-svelte@6 that uses node:util styleText. these tests are for browser behavior so i think its ok to update to 24 which should make them a bit more efficient (24 is faster than 18) |
||
| os: windows-latest | ||
| e2e-browser: 'chromium' | ||
| mode: 'dev' | ||
| - node-version: 18 | ||
| - node-version: 24 | ||
| os: ubuntu-latest | ||
| e2e-browser: 'firefox' | ||
| mode: 'dev' | ||
| - node-version: 18 | ||
| - node-version: 24 | ||
| os: macOS-latest | ||
| e2e-browser: 'webkit' | ||
| mode: 'dev' | ||
| - node-version: 18 | ||
| - node-version: 24 | ||
| os: windows-latest | ||
| e2e-browser: 'chromium' | ||
| mode: 'build' | ||
| - node-version: 18 | ||
| - node-version: 24 | ||
| os: ubuntu-latest | ||
| e2e-browser: 'firefox' | ||
| mode: 'build' | ||
| - node-version: 18 | ||
| - node-version: 24 | ||
| os: macOS-latest | ||
| e2e-browser: 'webkit' | ||
| mode: 'build' | ||
|
|
@@ -235,6 +251,13 @@ jobs: | |
| with: | ||
| deno-version: ^2.2.4 | ||
| - run: pnpm install --frozen-lockfile | ||
| - name: setup overrides for matrix.node | ||
| if: matrix.node-version == 18 | ||
| run: | # copies catalogs.node-xx to overrides in pnpm-workspace.yaml so the subsequent `pnpm install` enforces them | ||
| yq -i '.overrides =.catalogs."node-18"' pnpm-workspace.yaml | ||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. similar to vite-baseline we have to pick versions that support node18 here otherwise it can break. |
||
| 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 @sveltejs/vite-plugin-svelte | ||
| - run: pnpm playwright install chromium | ||
| - run: cd packages/kit && pnpm prepublishOnly | ||
| - run: pnpm run test:others | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,5 @@ | ||
| <script> | ||
| import { get_event } from './data.remote.js'; | ||
| import { get_event } from './data.remote.ts'; | ||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. concession change for vite5, it doesn't work with data.remote.js on node 18, allowing .ts import and changing the imported suffix works. |
||
| const event = await get_event(); | ||
| </script> | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,5 @@ | ||
| <script> | ||
| import { total } from './data.remote.js'; | ||
| import { total } from './data.remote.ts'; | ||
| </script> | ||
|
|
||
| <h1>{await total()}</h1> |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,5 @@ | ||
| <script> | ||
| import { greeting } from './data.remote.js'; | ||
| import { greeting } from './data.remote.ts'; | ||
| </script> | ||
|
|
||
| <h1>{(await greeting()).bar()}</h1> |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,7 +1,7 @@ | ||
| import { increment } from './state'; | ||
| import { increment } from '../../state.js'; | ||
|
|
||
| export const load = () => { | ||
| return { | ||
| a: increment() | ||
| a: increment(import.meta.url) | ||
| }; | ||
| }; |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,7 +1,6 @@ | ||
| import { increment } from './state'; | ||
|
|
||
| import { increment } from '../../state.js'; | ||
| export const load = () => { | ||
| return { | ||
| b: increment() | ||
| b: increment(import.meta.url) | ||
| }; | ||
| }; |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| import { reset_states } from '../../../state.js'; | ||
| import { json } from '@sveltejs/kit'; | ||
|
|
||
| export const POST = () => { | ||
| return json(reset_states(import.meta.url)); | ||
| }; |
This file was deleted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
introduces a new matrix dimension called vite with 3 values
baseline: the lowest version of vite we support (peer range of sveltekit)
current: the version of vite currently in the lockfile
beta: the upcoming beta version of vite