From 1f73c9ecea2a92156730eb882b657ebdea10c9a1 Mon Sep 17 00:00:00 2001 From: Yunfei He Date: Fri, 29 May 2026 16:22:10 +0800 Subject: [PATCH] refactor(ci): cover all packages without polluting the test contract MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The previous fix (b77f42e, reverted in f0cc614) added a test:integration script to runtime and testing just so `vp run -r test:integration` would match them — polluting every package's contract to satisfy the CI graph. Restore the clean contract: normal packages (runtime, testing, cli) have only a plain `test`; only runtime-tests splits into test:integration + test:pty. The ci graph adapts instead of the packages: ci:test:misc -> vp run --filter "@vue-tui/*" --filter "!@vue-tui/runtime-tests" test ci:test:integration -> vp run @vue-tui/runtime-tests#test:integration ci:test:pty -> vp run @vue-tui/runtime-tests#test:pty misc runs every normal package's own `test` (the glob auto-covers future packages); runtime-tests' two suites are separate parallel branches, keeping the slow PTY suite off the critical path. Verified `CI=true vp run ci` on a fresh checkout: runtime (309) + testing (7) + integration (756) + pty (110), PTY runs exactly once, exit 0. --- vite.config.ts | 29 +++++++++++++++++++++++++---- 1 file changed, 25 insertions(+), 4 deletions(-) diff --git a/vite.config.ts b/vite.config.ts index bcbccb0..878a733 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -35,14 +35,35 @@ export default defineConfig({ // this doesn't change overall wall-clock. "ci:lint": { command: "vp run check:lint", dependsOn: ["ci:build"] }, "ci:type": { command: "vp run check:type", dependsOn: ["ci:build"] }, - "ci:test:integration": { - command: "vp run -r test:integration", + // Test branches. Normal packages keep a plain `test` script; only + // runtime-tests splits into test:integration + test:pty. So the graph + // runs every normal package's own `test` (misc), and runtime-tests' two + // suites as separate branches — keeping the slow PTY suite on its own + // parallel branch instead of serial inside runtime-tests' `test`. + // misc: select all @vue-tui/* packages, exclude runtime-tests. The glob + // means new normal packages are covered automatically. + "ci:test:misc": { + command: 'vp run --filter "@vue-tui/*" --filter "!@vue-tui/runtime-tests" test', + dependsOn: ["ci:build"], + }, + "ci:test:integration": { + command: "vp run @vue-tui/runtime-tests#test:integration", + dependsOn: ["ci:build"], + }, + "ci:test:pty": { + command: "vp run @vue-tui/runtime-tests#test:pty", dependsOn: ["ci:build"], }, - "ci:test:pty": { command: "vp run -r test:pty", dependsOn: ["ci:build"] }, ci: { command: "echo ci ok", - dependsOn: ["ci:fmt", "ci:lint", "ci:type", "ci:test:integration", "ci:test:pty"], + dependsOn: [ + "ci:fmt", + "ci:lint", + "ci:type", + "ci:test:misc", + "ci:test:integration", + "ci:test:pty", + ], }, }, },