Skip to content

Commit 5f6b37c

Browse files
committed
fix(e2e/varlet): replace bootstrap.mjs with vp run commands
The varlet ecosystem-ci job failed on CI because `node scripts/bootstrap.mjs` spawns `pnpm build` via tinyexec, and `pnpm` is not discoverable by Node's spawn on the runner. Bootstrap silently swallows errors, so internal packages (notably varlet-cli) were never compiled, leading to ERR_MODULE_NOT_FOUND when the test:coverage step later invoked varlet-cli. Replace the bootstrap call with explicit vp run commands that use vp's bundled runtime. Build phase 1/2 packages via -F filters (-r would hit the @varlet/cli <-> @varlet/ui devDependency cycle), then cli/icons/ui-compile sequentially. The cli tsc step reports type errors against @varlet/ui (still unbuilt) but emits JS output, which matches upstream bootstrap behavior.
1 parent e7b8b25 commit 5f6b37c

1 file changed

Lines changed: 10 additions & 1 deletion

File tree

.github/workflows/e2e-test.yml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -317,7 +317,16 @@ jobs:
317317
- name: varlet
318318
node-version: 22
319319
command: |
320-
node scripts/bootstrap.mjs
320+
# Replace `node scripts/bootstrap.mjs`, which spawns `pnpm build` via
321+
# tinyexec and cannot find pnpm on the CI runner (ENOENT). Run each
322+
# package's build through vp instead, which uses its bundled runtime.
323+
# Skip `-r` to avoid the @varlet/cli <-> @varlet/ui devDependency cycle.
324+
vp run -F '@varlet/shared' -F '@varlet/touch-emulator' -F '@varlet/preset-unocss' -F '@varlet/preset-tailwindcss' -F '@varlet/import-resolver' -F '@varlet/use' -F '@varlet/vite-plugins' build
325+
# tsc reports type errors against @varlet/ui (which isn't compiled yet)
326+
# but still emits JS output — matches upstream bootstrap behavior.
327+
vp run @varlet/cli#build || true
328+
vp run @varlet/icons#build
329+
vp run @varlet/ui#compile
321330
vp run lint
322331
vp run test:coverage
323332
exclude:

0 commit comments

Comments
 (0)