Skip to content

Commit d7759f3

Browse files
os-zhuangclaude
andauthored
ci: Test Core 按包两路分片,verify-CLI 拆为独立并行 job(PR 关键路径 ~13min → ~7min) (#4505)
* ci: Test Core 按包两路分片,verify-CLI 拆为独立并行 job CI 提速:PR 关键路径从 ~13 分钟降到 ~7 分钟。 - Test Core 改为 2 路矩阵,按包分片:scripts/partition-test-shards.mjs 以 测试文件数为权重做确定性 LPT 均衡(当前全量 573/572)。不用 dogfood 的 vitest --shard 透传,因为 vitest 4 对测试文件数少于分片数的包直接报错, 加 --passWithNoTests 后该包在所有分片上都不执行(静默丢覆盖);今天有 3 个单测试文件的包。required check 名称契约由新增的 test-gate 聚合 job 以裸 "Test Core" 上下文承载(#3622 教训,同 dogfood-gate)。 - `objectstack verify` CLI 步骤从 dogfood shard 1 尾部(串行 +4.5 分钟) 拆为并行的 dogfood-verify job,结果并入既有 Dogfood Regression Gate, 分支保护无需变更。 - temporal-conformance 的 Turbo 缓存回退键从 turbo-test-* 改指 turbo-build-core-*:test 命名空间分片化后,单个分片不再是其构建闭包 的超集,而 Build Core 构建全部包。 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01U8Ms7unkKxTrmNCX2r1dfs * ci: dogfood-verify 需构建示例 app 的完整依赖闭包 verify 步骤挂在 dogfood shard 1 时,workspace 已被测试步骤全量构建, --filter=@objectstack/cli 就够;独立成 job 后,打包的 objectstack.config 在运行时还要导入示例 app 自身的依赖(如 app-showcase 的 @objectstack/connector-mcp),其 dist 无人构建 → verify 时 ERR_MODULE_NOT_FOUND。改用 pkg... 闭包过滤同时构建 CLI 与两个示例 app 的依赖闭包,依赖变动时自维护。已本地实测 app-showcase verify 通过。 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01U8Ms7unkKxTrmNCX2r1dfs --------- Co-authored-by: Claude <noreply@anthropic.com>
1 parent 8aacf94 commit d7759f3

3 files changed

Lines changed: 378 additions & 68 deletions

File tree

.changeset/ci-shard-test-core.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
---
3+
4+
CI-only: shard the Test Core job by package (deterministic, test-file-count-balanced
5+
halves via `scripts/partition-test-shards.mjs`), move the dogfood verify-CLI pass into
6+
its own parallel job aggregated by the existing Dogfood Regression Gate, and repoint
7+
the temporal-conformance Turbo cache fallback at the Build Core namespace. Releases
8+
nothing.

0 commit comments

Comments
 (0)