Repository navigation
529 lines (502 loc) · 22.4 KB
/
Copy pathreusable-ecosystem-ci.yml
File metadata and controls
529 lines (502 loc) · 22.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
name: Reusable Ecosystem CI
on:
workflow_call:
inputs:
runner:
description: Runner for ecosystem tests and the default package build.
type: string
required: true
build-runner:
description: Optional runner for the package build.
type: string
default: ''
target:
description: Rust target for the package build.
type: string
required: true
permissions: {}
defaults:
run:
shell: bash
env:
VP_NODE_DIST_MIRROR: ${{ vars.VP_NODE_DIST_MIRROR || 'https://nodejs.org/dist' }}
jobs:
build:
name: Build vite-plus packages (${{ inputs.build-runner || inputs.runner }})
runs-on: ${{ inputs.build-runner || inputs.runner }}
permissions:
contents: read
packages: read
steps:
- uses: taiki-e/checkout-action@7d1e50e93dc4fb3bba58f85018fadf77898aee8b # v1.4.2
- uses: ./.github/actions/clone
# Disable Windows Defender real-time scanning to speed up I/O-heavy builds (~30-50% faster)
- name: Disable Windows Defender
if: runner.os == 'Windows'
continue-on-error: true
shell: powershell
run: Set-MpPreference -DisableRealtimeMonitoring $true
# Windows builds against the prebuilt binaries from build-windows-cli, so
# it needs no Rust toolchain here.
- uses: ./.github/actions/setup-rust
if: ${{ !contains(inputs.target, 'windows') }}
with:
# Reuse the CLI build job's Cargo cache for the ci profile.
save-cache: false
cache-key: cli-snapshot-test-${{ inputs.target }}-ci
- uses: oxc-project/setup-node@1f1a5b4450c8905bd1830c3a908d22b960c4559a # main (Node before pnpm; unreleased)
- uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8.0.2
with:
name: rolldown-binaries
path: ./rolldown/packages/rolldown/src
merge-multiple: true
# Prebuilt by build-windows-cli (Linux + cargo-xwin); placed where
# build-upstream's skip-native pass and the pack step expect them.
- name: Download prebuilt Windows binaries
if: contains(inputs.target, 'windows')
uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8.0.2
with:
name: windows-cli-binaries
- name: Build with upstream
uses: ./.github/actions/build-upstream
with:
profile: ci
target: ${{ inputs.target }}
skip-native: ${{ contains(inputs.target, 'windows') }}
- name: Pack packages into tgz
env:
BUILD_TARGET: ${{ inputs.target }}
run: |
mkdir -p tmp/tgz
# patch-project.ts serves these tgz through a local npm registry
# (packages/tools/src/local-npm-registry.ts), so `vp migrate` pins
# and installs them like a real release, with every package manager
# (including bun) resolving the standard
# `vite -> npm:@voidzero-dev/vite-plus-core@<version>` alias. Pin
# both packages to 0.0.0 so a correctly installed local build is
# always distinguishable from any published version
# (verify-install.ts asserts it), even on a release commit that
# leaves packages/{core,cli} at a published version.
(cd packages/core && npm pkg set version=0.0.0)
(cd packages/cli && npm pkg set version=0.0.0)
cd packages/core && pnpm pack --pack-destination ../../tmp/tgz && cd ../..
cd packages/cli && pnpm pack --pack-destination ../../tmp/tgz && cd ../..
# Copy vp binary for e2e-test job (findVpBinary expects it in target/)
cp "target/$BUILD_TARGET/release/vp" tmp/tgz/vp 2>/dev/null || cp "target/$BUILD_TARGET/release/vp.exe" tmp/tgz/vp.exe 2>/dev/null || true
cp "target/$BUILD_TARGET/release/vp-shim.exe" tmp/tgz/vp-shim.exe 2>/dev/null || true
ls -la tmp/tgz
- name: Upload tgz artifacts
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
with:
name: vite-plus-packages-${{ inputs.runner }}
path: tmp/tgz/
retention-days: 1
e2e-test:
name: ${{ matrix.project.name }} E2E test (${{ matrix.os }})
env:
# For packing manager install from github package registry
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# Passed through --api.port; Vitest has no environment variable for this option.
# Avoid Windows dynamic port reservations around the default 63315.
# https://github.com/vitest-dev/vitest/issues/9035
ECOSYSTEM_VITEST_PORT: '7357'
# Without a project pin, vp runs project commands on the latest LTS.
# `node-version` only selects the bootstrap Node.js for actions/setup-node.
# vp ignores an empty value.
VP_NODE_VERSION: ${{ matrix.project.vp-node-version || '' }}
permissions:
contents: read
packages: read
needs:
- build
runs-on: ${{ matrix.os }}
timeout-minutes: ${{ matrix.project.timeout || 10 }}
strategy:
fail-fast: false
matrix:
os: ['${{ inputs.runner }}']
project:
- name: vibe-dashboard
node-version: 24
command: |
# FIXME: Failed to load JS plugin: ./plugins/debugger.js
# vp run ready
vp fmt
vp test --api.port="$ECOSYSTEM_VITEST_PORT"
vp run build
vp run test:dev
# FIXME: TypeError: Failed to fetch dynamically imported module
# - name: skeleton
# node-version: 24
# command: |
# vp run format
# vp run lint:check
# vp run check
# npx playwright install chromium
# vp run test
- name: rollipop
node-version: 22
command: |
vp run -r build
# FIXME: typescript-eslint(no-redundant-type-constituents): 'rolldownExperimental.DevEngine' is an 'error' type that acts as 'any' and overrides all other types in this union type.
vp run lint || true
# FIXME: src/bundler-pool.ts(8,8): error TS2307: Cannot find module '@rollipop/core' or its corresponding type declarations.
vp run -r typecheck || true
vp run format
vp run @rollipop/common#test
vp run @rollipop/core#test
vp run @rollipop/dev-server#test
- name: frm-stack
node-version: 24
command: |
vp run lint:check
vp run format:check
vp run typecheck
vp run @yourcompany/api#test
vp run @yourcompany/backend-core#test
- name: vue-mini
node-version: 24
command: |
# FIXME: skip format for now, will re-enable after prettier migration support
# vp run format
# FIXME: oxlint 1.59.0 no-useless-assignment has false positives on module-level
# state variables and closure-captured variables (oxc-project/oxc#3022).
# The migration sets the rule as "error" in vite.config.ts, so --allow can't override it.
vp run lint || true
vp run type
vp run test -- --coverage
# SKIP: vite-plugin-react - vite-task config loading incompatibility
# vite-task needs to load vite.config.js for all workspace packages to build the task graph,
# but the vite-plus process starts with workspace root as cwd.
# The plugin-react-swc playgrounds use SWC plugins (e.g., @swc/plugin-emotion) which
# cannot be resolved when loading the config from workspace root.
#
# Minimal reproduction:
# git clone https://github.com/vitejs/vite-plugin-react /tmp/vite-plugin-react-test
# cd /tmp/vite-plugin-react-test && pnpm install && pnpm run build
# node packages/plugin-react-swc/playground/emotion-plugin/vite.config.js
# # Error: Cannot find module '@swc/plugin-emotion'
#
# This works when running from within the playground directory (pnpm run build)
# because pnpm's symlink structure allows resolution, but fails when loading from workspace root.
# - name: vite-plugin-react
# node-version: 22
# command: |
# vp run format
# vp run lint -- --fix
# # TODO(fengmk2): run all builds and tests after tsdown version upgrade
# vp run @vitejs/plugin-rsc#build
# vp run @vitejs/plugin-rsc#test
- name: vitepress
node-version: 24
command: |
vp run format
vp run build
vp test run -r __tests__/unit
vp run tests-e2e#test
VITE_TEST_BUILD=1 vp run tests-e2e#test
vp run tests-init#test
- name: tanstack-start-helloworld
node-version: 24
command: |
vp run test --api.port="$ECOSYSTEM_VITEST_PORT"
vp run build
- name: oxlint-plugin-complexity
node-version: 22
command: |
vp run format
vp run format:check
vp run build
vp run lint
vp run test:run
npx tsc --noEmit
- name: decoders
node-version: 24
command: |
vp pack
vp test
- name: vite-vue-vercel
node-version: 24
command: |
vp run test --api.port="$ECOSYSTEM_VITEST_PORT"
vp run build
- name: dify
node-version: 24
directory: web
# Leave time for tests after migration and the Next.js build.
timeout: 20
command: |
vp run type-check
vp run build
vp run test real-browser-flicker.test.tsx workflow-onboarding-integration.test.tsx
- name: viteplus-ws-repro
node-version: 24
command: |
vp test run
- name: vp-config
node-version: 22
command: |
vp check
vp pack
vp test
- name: vinext
node-version: 24
# better-sqlite3 12.6.2 does not compile against the Node 26 headers.
vp-node-version: 24.22.1
# The full vinext suite (~7000 tests) outgrew a 15-minute budget
# on 4-core runners, so run one shard of the unit project here;
# the rest of the suite is covered by vinext's own CI.
timeout: 20
command: |
# vp migrate's auto-install passes --ignore-scripts on pnpm v11
# (vinext pins pnpm 11), which skips vinext's approved
# better-sqlite3 build, and the follow-up `vp install` never
# re-runs it. Rebuild it so the better-auth fixture works.
vp rebuild -- -r better-sqlite3
vp run build
vp check --fix
vp run check
vp test run --project unit --shard=1/3
- name: videojs-v10
node-version: 24
command: |
node $GITHUB_WORKSPACE/ecosystem-ci/verify-videojs-v10.ts
# The upstream preset keeps existing diagnostics at warning level.
vp lint --quiet
vp test run tools/oxlint/anti-slop/rules/tests
- name: reactive-resume
node-version: 24
command: |
vp fmt
vp lint --type-aware
vp build
vp test
- name: yaak
node-version: 24
command: |
vp fmt
# FIXME: type-aware lint fails with "Invalid tsconfig" without full Rust/wasm bootstrap
vp lint || true
vp test
- name: npmx.dev
node-version: 24
command: |
vp fmt
vp run lint
vp run test:types
vp test --project nuxt --api.port="$ECOSYSTEM_VITEST_PORT"
vp test --project unit
- name: codiff
node-version: 24
timeout: 20
command: |
# Codiff uses pnpm's default 24-hour release age. Allow newly
# published toolchain packages in this ecosystem run.
export pnpm_config_minimum_release_age=0
export PNPM_CONFIG_MINIMUM_RELEASE_AGE=0
# Migration skips install scripts. node-pty has no Linux prebuild,
# so build its approved native addon before running the tests.
vp pm rebuild node-pty
vp run build
# The separate Workers integration suite still requires Vitest 4.
vp test run
- name: vite-plus-jest-dom-repro
node-version: 24
command: |
vp test run
- name: bun-vite-template
node-version: 24
command: |
# FIXME: mantine uses postcss-simple-vars (e.g. `@media (max-width:
# $mantine-breakpoint-md)` in src/components/Welcome/Welcome.module.css),
# which oxfmt's CSS parser does not support yet (regressed in oxfmt 0.57.0
# after the switch to oxc-css-parser). Tracking issue:
# https://github.com/oxc-project/oxc/issues/23969. Drop the `|| true`
# once postcss-simple-vars syntax is supported.
vp fmt || true
vp run validate
- name: vite-plus-vitest-global-type-minimal-repro
node-version: 24
command: |
vp test
vp check --fix
- name: vitest-playwright-repro
node-version: 24
command: |
vp test --api.port="$ECOSYSTEM_VITEST_PORT"
- name: vite-plus-vitest-type-aug
node-version: 24
command: |
vp check --fix
- name: vite-plus-monorepo-overrides
node-version: 24
command: |
vp check --fix
vp run verify
- name: varlet
node-version: 22
command: |
node scripts/bootstrap.mjs
# Report-only: oxlint 1.68.0 surfaces ts1038 ("A 'declare' modifier
# cannot be used in an already ambient context.") on varlet's
# packages/varlet-cli/src/module.d.ts, which carries a redundant
# `declare` inside an ambient `declare module 'jest'` block. varlet can
# only drop the redundant modifier upstream once a vite-plus release
# ships oxlint 1.68.0, so don't fail the matrix on it yet. Follow-up:
# submit a fix PR to varletjs/varlet after the next vite-plus release.
vp run lint || true
vp run test:coverage
- name: nuxt-devtools
node-version: 24
# The Windows build can exceed Node's default old-space limit.
node-options: --max-old-space-size=4096
command: |
vp run build
vp run typecheck
vp run test:unit
- name: tiptap
node-version: 24
command: |
vp run build && vp run build:demos
vp run lint
vp run test:unit
- name: 10ten-ja-reader
# Match upstream's pin for its locked WebDriverIO/Undici versions.
node-version: 24.15.0
command: |
vp test run --project browser --browser.name=chrome --api.port="$ECOSYSTEM_VITEST_PORT"
- name: sqlocal
node-version: 24
# The WebDriverIO provider cannot connect to Chrome on Node 26 (see #3266).
vp-node-version: 24.22.1
command: |
# OPFS setup can exceed the upstream 1-second hook timeout on CI.
vp test run --browser.name=chrome --hookTimeout=5000 --api.port="$ECOSYSTEM_VITEST_PORT"
- name: brazilian-utils
node-version: 24
# The WebDriverIO provider cannot connect to Chrome on Node 26 (see #3266).
vp-node-version: 24.22.1
command: |
vp test run --browser.enabled --browser.name=chrome --browser.headless --api.port="$ECOSYSTEM_VITEST_PORT"
- name: solid-vite-plugin
node-version: 24
# The next branch's Vite 8 example uses Solid 2 and @solidjs/vite-plugin.
directory: examples/vite-8
command: |
# Build the workspace plugin before vp run loads the example configs.
(cd ../.. && vp exec rollup -c)
vp run build
vp run test --api.port="$ECOSYSTEM_VITEST_PORT"
exclude:
# frm-stack uses Docker (testcontainers) which doesn't work the same way on Windows
- os: namespace-profile-windows-4c-8g
project:
name: frm-stack
# dify only runs on Linux for now
- os: namespace-profile-windows-4c-8g
project:
name: dify
# vinext uses workerd native deps that don't build on Windows
- os: namespace-profile-windows-4c-8g
project:
name: vinext
# yaak is a Tauri app with Rust/wasm deps
- os: namespace-profile-windows-4c-8g
project:
name: yaak
# npmx.dev is a Nuxt app, ubuntu-only for now
- os: namespace-profile-windows-4c-8g
project:
name: npmx.dev
# varlet upstream CI is ubuntu-only
- os: namespace-profile-windows-4c-8g
project:
name: varlet
# Codiff's upstream test job is Ubuntu-only and needs native-keymap system libraries.
- os: namespace-profile-windows-4c-8g
project:
name: codiff
# tiptap upstream CI is ubuntu-only
- os: namespace-profile-windows-4c-8g
project:
name: tiptap
# Match upstream's Linux Chrome jobs for these WebDriverIO suites.
- os: namespace-profile-windows-4c-8g
project:
name: 10ten-ja-reader
- os: namespace-profile-windows-4c-8g
project:
name: sqlocal
- os: namespace-profile-windows-4c-8g
project:
name: brazilian-utils
steps:
- uses: taiki-e/checkout-action@7d1e50e93dc4fb3bba58f85018fadf77898aee8b # v1.4.2
- uses: ./.github/actions/clone
# The project clone only needs the bootstrap Node.js from the clone action.
- name: Clone ecosystem project
id: ecosystem-project
background: true
run: |
git config --global core.autocrlf false
node ecosystem-ci/clone.ts "$ECOSYSTEM_PROJECT"
env:
ECOSYSTEM_PROJECT: ${{ matrix.project.name }}
# Disable Windows Defender real-time scanning to speed up I/O-heavy operations
- name: Disable Windows Defender
if: runner.os == 'Windows'
continue-on-error: true
shell: powershell
run: Set-MpPreference -DisableRealtimeMonitoring $true
- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0
with:
node-version: ${{ matrix.project.node-version }}
package-manager-cache: false
- name: Download vite-plus packages
uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8.0.2
with:
name: vite-plus-packages-${{ matrix.os }}
path: tmp/tgz
- name: Install Codiff native-keymap dependencies
if: matrix.project.name == 'codiff'
run: |
sudo apt-get update
sudo apt-get install --yes libx11-dev libxkbfile-dev
- name: Install vp CLI
run: |
# Place vp binary where install-global-cli.ts expects it (target/release/)
mkdir -p target/release
cp tmp/tgz/vp target/release/vp 2>/dev/null || cp tmp/tgz/vp.exe target/release/vp.exe 2>/dev/null || true
cp tmp/tgz/vp-shim.exe target/release/vp-shim.exe 2>/dev/null || true
chmod +x target/release/vp 2>/dev/null || true
VP_TGZ=$(ls "$GITHUB_WORKSPACE"/tmp/tgz/vite-plus-[0-9]*.tgz | head -n1)
node "$GITHUB_WORKSPACE"/packages/tools/src/install-global-cli.ts --tgz "$VP_TGZ"
# Use USERPROFILE (native Windows path) instead of HOME (Git Bash path /c/Users/...)
# so cmd.exe and Node.js execSync can resolve binaries in PATH
echo "${USERPROFILE:-$HOME}/.vite-plus/bin" >> $GITHUB_PATH
- wait: ecosystem-project
- name: Migrate in ${{ matrix.project.name }}
working-directory: ${{ runner.temp }}/vite-plus-ecosystem-ci/${{ matrix.project.name }}${{ matrix.project.directory && format('/{0}', matrix.project.directory) || '' }}
# patch-project.ts starts a local npm registry serving the packed
# local build (it stays up for the later steps; the registry env is
# exported via GITHUB_ENV), then runs `vp migrate` and the follow-up
# `vp install` through it, with pnpm's minimumReleaseAge gate disabled
# so freshly published upstream deps install. See its comments.
run: node $GITHUB_WORKSPACE/ecosystem-ci/patch-project.ts ${{ matrix.project.name }}
- name: Verify local packages installed
working-directory: ${{ runner.temp }}/vite-plus-ecosystem-ci/${{ matrix.project.name }}${{ matrix.project.directory && format('/{0}', matrix.project.directory) || '' }}
run: node $GITHUB_WORKSPACE/ecosystem-ci/verify-install.ts
- name: Determine playwright requirement
id: pw
run: |
needs=$(jq -r --arg p '${{ matrix.project.name }}' '.[$p].playwright // false' "$GITHUB_WORKSPACE/ecosystem-ci/repo.json")
echo "needs=$needs" >> "$GITHUB_OUTPUT"
- name: Install Playwright chromium
if: steps.pw.outputs.needs == 'true'
working-directory: ${{ runner.temp }}/vite-plus-ecosystem-ci/${{ matrix.project.name }}${{ matrix.project.directory && format('/{0}', matrix.project.directory) || '' }}
run: npx playwright install chromium
- name: Run vite-plus commands in ${{ matrix.project.name }}
working-directory: ${{ runner.temp }}/vite-plus-ecosystem-ci/${{ matrix.project.name }}${{ matrix.project.directory && format('/{0}', matrix.project.directory) || '' }}
env:
NODE_OPTIONS: ${{ matrix.project.node-options || '' }}
run: ${{ matrix.project.command }}