修复AGC壳CI缺少Claude SDK依赖安装 (#558)
Project CI / AI game creator shell Rust crates (push) Successful in 1m32s
Project CI / AI game creator shell Rust smoke (push) Successful in 3m54s
Project CI / Backend tests (push) Successful in 5m55s
Project CI / Frontend tests (push) Successful in 2m58s
Project CI / Native shell tests (push) Successful in 6m43s
Project CI / AI game creator shell Rust lane 2/2 (push) Successful in 11m31s
Project CI / AI game creator shell Rust lane 1/2 (push) Successful in 13m4s
Project CI / Repository checks (push) Successful in 4m16s
Project CI / AI game creator shell web tests (push) Successful in 5m13s

为两条Rust测试lane及smoke任务补齐编译前npm安装
为Rust缓存预热补齐Claude SDK依赖安装
更新CI安装顺序验证及开发运维文档和共享记忆

Reviewed-on: #558
Co-authored-by: Linghong <ink29535@proton.me>
Co-committed-by: Linghong <ink29535@proton.me>
This commit was merged in pull request #558.
This commit is contained in:
2026-09-30 18:11:17 +08:00
committed by 孔令弘
parent 9ee34809be
commit c6381f68e1
7 changed files with 40 additions and 16 deletions
+2
View File
@@ -107,6 +107,8 @@ done
echo '[rust-cache] warming desktop tests and AGC prompt contracts'
cargo test --manifest-path apps/desktop-shell/src-tauri/Cargo.toml --no-run
# AGC build.rs 从 node_modules 准备 Claude Agent SDK 与目标平台原生运行时。
bash scripts/ci-npm-ci-with-retry.sh
cargo test --locked --manifest-path apps/ai-game-creator-shell/src-tauri/Cargo.toml \
--test runtime_prompt_bundle_build --test prompt_source_boundaries --no-run
+18 -7
View File
@@ -67,14 +67,9 @@ const jobNames = [
'ai-game-creator-shell-rust-crates',
] as const;
// 这几个 job 是纯 cargo 门禁:AGC 壳的 Rust 分片与 agent-run smoke 只用 cargo 与
// node 内建模块(smoke 脚本只 import `node:*`),crate 级测试只跑 cargo 命令,
// 都不需要 node_modules。省掉这些 `npm ci`(各 1~3 分钟)是把客户端 Rust 关键路径
// 压到 7 分钟以内的前提,因此这里显式允许它们不装 npm 依赖。
// crate 级测试只跑共享 / 平台 / 编辑器插件的 Cargo manifest,不构建 AGC 壳。
// 壳的 Rust 分片与 agent-run smoke 会执行 build.rs,需要 npm 安装的 Claude Agent SDK。
const jobsWithoutNpmInstall: readonly string[] = [
'ai-game-creator-shell-rust-lane-1',
'ai-game-creator-shell-rust-lane-2',
'ai-game-creator-shell-rust-smoke',
'ai-game-creator-shell-rust-crates',
];
@@ -199,6 +194,13 @@ describe('project CI workflow', () => {
section.indexOf('Checkout full history from Gitea'),
);
expect(prepare).toBeLessThan(section.indexOf(`- name: ${firstRustStep}`));
if (!jobsWithoutNpmInstall.includes(job)) {
const npmInstall = section.indexOf(
'bash scripts/ci-npm-ci-with-retry.sh',
);
expect(npmInstall).toBeGreaterThanOrEqual(0);
expect(npmInstall).toBeLessThan(prepare);
}
expect(
stepSection(job, 'Report isolated Rust compilation cache'),
).toContain('if: always()');
@@ -246,6 +248,15 @@ describe('project CI workflow', () => {
expect(warmCommands).toContain(
'cargo test --manifest-path apps/desktop-shell/src-tauri/Cargo.toml --no-run',
);
const npmInstall = warmCommands.indexOf(
'bash scripts/ci-npm-ci-with-retry.sh',
);
expect(npmInstall).toBeGreaterThanOrEqual(0);
expect(npmInstall).toBeLessThan(
warmCommands.indexOf(
'cargo test --locked --manifest-path apps/ai-game-creator-shell/src-tauri/Cargo.toml',
),
);
});
it('runs for master pushes, pull requests, and manual dispatch only', () => {