perf(ci): parallelize verification via a vp run.tasks graph
Replace ci.yml's five serial steps with a single `vp run ci` whose graph lives in vite.config.ts (run.tasks). The vp task runner fans out independent branches concurrently: fmt and lint start immediately while check:type and the test suites wait on build (their consumers resolve @vue-tui/runtime from the built dist/*.d.mts). The wall-clock critical path becomes build -> test:pty instead of the sum of every check. Measured cold (no task cache, no prebuilt dist — the real CI condition): the graph completes in ~41s vs ~60s serial, ~32% faster, with build correctly fanned out before the type and test branches. `vp run --last-details` (and the run summary) still pinpoints which sub-task failed. Also set run.cache=false so neither local nor CI verification depends on any task-cache replay. The serial `ready` script in package.json is kept for simple local use.
This commit is contained in:
+10
-19
@@ -39,22 +39,13 @@ jobs:
|
||||
node-version: "22.12.0"
|
||||
cache: true
|
||||
|
||||
# Steps mirror `vp run ready` as individual, labeled concerns so the run
|
||||
# shows exactly which one failed. Build MUST precede check:type and test:
|
||||
# @vue-tui/runtime exposes no "types" export, so testing / runtime-tests
|
||||
# resolve its types and runtime from the built dist/*.d.mts. Steps in one
|
||||
# job share the filesystem, so the build output persists to later steps.
|
||||
- name: Format
|
||||
run: vp run check:fmt
|
||||
|
||||
- name: Lint
|
||||
run: vp run check:lint
|
||||
|
||||
- name: Build
|
||||
run: vp run build
|
||||
|
||||
- name: Type check
|
||||
run: vp run check:type
|
||||
|
||||
- name: Test
|
||||
run: vp run test
|
||||
# `ci` is the parallel verification graph defined in vite.config.ts
|
||||
# (run.tasks). The vp task runner fans out independent branches
|
||||
# concurrently — fmt and lint start immediately, while check:type and the
|
||||
# test suites wait on build (their consumers resolve @vue-tui/runtime from
|
||||
# the built dist) — so the wall-clock critical path is build -> test:pty
|
||||
# rather than the sum of every check. On a cache miss this finishes in
|
||||
# ~40s vs ~60s run serially. `vp run --last-details` (or the run summary)
|
||||
# shows which sub-task failed when one does.
|
||||
- name: Verify (vp run ci)
|
||||
run: vp run ci
|
||||
|
||||
Reference in New Issue
Block a user