按门禁组拆分客户端 CI,AGC 的 web / rust 两段并行
Project CI / Native shell tests (push) Failing after 3m36s
Project CI / Frontend tests (push) Successful in 4m13s
Project CI / Repository checks (push) Successful in 3m3s
Project CI / AI game creator shell web tests (push) Successful in 2m31s
Project CI / Backend tests (push) Successful in 7m49s
Project CI / AI game creator shell Rust tests (push) Successful in 14m10s
Project CI / Native shell tests (push) Failing after 3m36s
Project CI / Frontend tests (push) Successful in 4m13s
Project CI / Repository checks (push) Successful in 3m3s
Project CI / AI game creator shell web tests (push) Successful in 2m31s
Project CI / Backend tests (push) Successful in 7m49s
Project CI / AI game creator shell Rust tests (push) Successful in 14m10s
原生壳门禁原本挤在同一个 job 里串行执行,跑一遍 18 分 37 秒,其中 AI 游戏创作 壳独占约 15 分钟(壳内 Rust 套件 2451 条用例串行 441 秒),而微信 / 移动 / 桌面 / H5 的全部门禁加起来不到 50 秒。长尾拖住短门禁,runner 也无法并行。 - scripts/check-native-shells.mjs 支持 `--groups=`(contract / shells / agc-web / agc-rust / release):每个步骤与静态断言归属且只归属一个分组,不带参数时仍按 原顺序串行跑全部分组,本地 `npm run check:native-shells` 语义不变。 - 顺带修掉 H5 HostBridge 调用链扫描在 Windows 上恒红的缺陷:collectFiles 返回 反斜杠路径而期望清单是 POSIX 写法,scannedFiles.has() 永远为假。新增 normalizeScannedFilePath 只统一分隔符(不能复用会去后缀的 normalizeModulePath), 在 Linux 上是恒等变换。 - package.json 增加 5 个分组脚本,并把 ai-game-creator-shell:check 拆成 :check:web 与 :check:rust;聚合脚本保持 web && rust && agent-run:smoke 同序。 agent-run smoke 会 spawn cargo,因此归入 agc-rust。 - .gitea/workflows/project-ci.yml 拆成 6 个 job:新增 native-shell-tests(contract + shells + release)、ai-game-creator-shell-web-tests、ai-game-creator-shell-rust-tests 三个门禁 job,与 backend-tests / frontend-tests / repository-checks 并列。 - scripts/project-ci-workflow.test.ts 增加 3 条结构测试:分组恰好被一个 job 调用且 与脚本内声明一致、CI 不再调用全量入口、AGC web/rust 拆分与聚合脚本等价、独立 crate 预热必须发生在 AGC Rust 门禁之前。 - 同步运维文档、development-workflow、decision-log、pitfalls。 验证:`--groups=contract` 本地通过;vitest 11 passed;eslint 与 prettier 通过; check:encoding 13329 文件通过;check:doc-index 103 份通过。shells / agc-web / agc-rust / release 分组只能由 Linux CI 执行(Windows 上 spawnSync npm.cmd 报 EINVAL,属既有平台限制,非本次引入)。分支保护需补两个新 required context: `Project CI / AI game creator shell web tests (pull_request)` 与 `Project CI / AI game creator shell Rust tests (pull_request)`。 Co-authored-by: DotCraft <273930855+dotcraft-ai@users.noreply.github.com>
This commit is contained in:
+9
-2
@@ -197,8 +197,15 @@
|
||||
"agent-runtime-core:check": "cargo test --manifest-path server-rs/crates/agent-runtime-core/Cargo.toml",
|
||||
"agent-runtime-orchestration:check": "cargo test --manifest-path server-rs/crates/agent-runtime-orchestration/Cargo.toml",
|
||||
"ai-game-creator-shell:typecheck": "npm --prefix apps/ai-game-creator-shell run typecheck",
|
||||
"ai-game-creator-shell:check": "npm run ai-game-creator-shell:typecheck && npm run test -- apps/ai-game-creator-shell/tests && npm run agent-runtime-core:check && npm run agent-runtime-orchestration:check && cargo test --locked -p platform-llm --manifest-path server-rs/Cargo.toml && cargo test --locked -p shared-contracts --manifest-path server-rs/Cargo.toml game_creation_app && cargo test --locked --manifest-path apps/ai-game-creator-shell/src-tauri/Cargo.toml -- --test-threads=1 && npm run ai-game-creator-shell:agent-run:smoke",
|
||||
"check:native-shells": "node scripts/check-native-shells.mjs"
|
||||
"ai-game-creator-shell:check:web": "npm run ai-game-creator-shell:typecheck && npm run test -- apps/ai-game-creator-shell/tests",
|
||||
"ai-game-creator-shell:check:rust": "npm run agent-runtime-core:check && npm run agent-runtime-orchestration:check && cargo test --locked -p platform-llm --manifest-path server-rs/Cargo.toml && cargo test --locked -p shared-contracts --manifest-path server-rs/Cargo.toml game_creation_app && cargo test --locked --manifest-path apps/ai-game-creator-shell/src-tauri/Cargo.toml -- --test-threads=1",
|
||||
"ai-game-creator-shell:check": "npm run ai-game-creator-shell:check:web && npm run ai-game-creator-shell:check:rust && npm run ai-game-creator-shell:agent-run:smoke",
|
||||
"check:native-shells": "node scripts/check-native-shells.mjs",
|
||||
"check:native-shells:contract": "node scripts/check-native-shells.mjs --groups=contract",
|
||||
"check:native-shells:shells": "node scripts/check-native-shells.mjs --groups=shells",
|
||||
"check:native-shells:agc-web": "node scripts/check-native-shells.mjs --groups=agc-web",
|
||||
"check:native-shells:agc-rust": "node scripts/check-native-shells.mjs --groups=agc-rust",
|
||||
"check:native-shells:release": "node scripts/check-native-shells.mjs --groups=release"
|
||||
},
|
||||
"dependencies": {
|
||||
"@genarrative/image-canvas-core": "0.1.0",
|
||||
|
||||
Reference in New Issue
Block a user