Merge pull request 'test/静默测试成功用例' (#614) from test/silent-is-gold into master
Project CI / AI game creator shell Rust lane 1/2 (push) Successful in 8m6s
Project CI / AI game creator shell Rust crates (push) Successful in 4m6s
Project CI / AI game creator shell Rust lane 2/2 (push) Successful in 6m54s
Project CI / Frontend tests (push) Successful in 3m17s
Project CI / Backend tests (push) Successful in 7m49s
Project CI / AI game creator shell web tests (push) Successful in 3m13s
Project CI / Repository checks (push) Successful in 6m36s
Project CI / Native shell tests (push) Successful in 9m26s

Reviewed-on: #614
This commit was merged in pull request #614.
This commit is contained in:
2026-10-04 17:02:12 +08:00
6 changed files with 14 additions and 4 deletions
+3
View File
@@ -20,6 +20,9 @@ env:
CARGO_HTTP_MULTIPLEXING: 'false'
CARGO_NET_RETRY: '10'
CARGO_TERM_COLOR: always
# 等价于给每条 `cargo test` 加 `-q`:通过的用例只打点号,失败的才按名字列出。
# 对 npm 脚本、shard runner 里嵌套的 cargo 同样生效,避免逐条 `test ... ok` 刷屏。
CARGO_TERM_QUIET: 'true'
NPM_CONFIG_AUDIT: 'false'
NPM_CONFIG_FETCH_RETRIES: '10'
NPM_CONFIG_FETCH_RETRY_FACTOR: '2'
+1 -1
View File
@@ -16,7 +16,7 @@
"bundled-resources:check": "node scripts/check-package-layout.mjs",
"bundled-resources:sync": "node scripts/check-package-layout.mjs --write",
"bundled-resources:prepare": "node scripts/prepare-bundled-resources.mjs",
"bundled-resources:test": "node --test scripts/prepare-bundled-resources.test.mjs",
"bundled-resources:test": "node --test --test-reporter=dot scripts/prepare-bundled-resources.test.mjs",
"llm-status": "node scripts/run-cli-with-config.mjs --llm-status",
"config": "node scripts/game-creator-config-wizard.mjs",
"check:tests:types": "tsc -p tsconfig.tests.json --noEmit",
+1 -1
View File
@@ -189,7 +189,7 @@
"agc:bundled-resources:sync": "npm --prefix apps/ai-game-creator-shell run bundled-resources:sync",
"agc:bundled-resources:prepare": "npm --prefix apps/ai-game-creator-shell run bundled-resources:prepare --",
"agc:bundled-resources:test": "npm --prefix apps/ai-game-creator-shell run bundled-resources:test --",
"agc:plugins:test": "node --test plugins/agc-cocos-editor/src/entry.test.mjs plugins/agc-unity-editor/src/entry.test.mjs plugins/agc-godot-editor/src/entry.test.mjs",
"agc:plugins:test": "node --test --test-reporter=dot plugins/agc-cocos-editor/src/entry.test.mjs plugins/agc-unity-editor/src/entry.test.mjs plugins/agc-godot-editor/src/entry.test.mjs",
"agc:plugins:native-test": "cargo test --manifest-path plugins/agc-cocos-editor/native/cocos-editor-bridge/Cargo.toml && cargo test --locked --manifest-path plugins/agc-unity-editor/native/unity-editor-bridge/Cargo.toml && cargo test --locked --manifest-path plugins/agc-godot-editor/native/godot-editor-bridge/Cargo.toml",
"agc:plugins:check": "npm run agc:plugins:test && npm run agc:plugins:native-test",
"agc:check": "npm run ai-game-creator-shell:check",
+1 -1
View File
@@ -75,7 +75,7 @@ set -euo pipefail
rustc -vV > /opt/genarrative-ci/rust-cache/rustc.txt
export GITHUB_ENV=/tmp/rust-cache.env CARGO_INCREMENTAL=0 CARGO_BUILD_JOBS=4 CI=true
# sccache 对 CARGO_*(除 jobserver/jobs 等特例)参与 hash,必须与 workflow 对齐。
export CARGO_HTTP_MULTIPLEXING=false CARGO_NET_RETRY=10 CARGO_TERM_COLOR=always
export CARGO_HTTP_MULTIPLEXING=false CARGO_NET_RETRY=10 CARGO_TERM_COLOR=always CARGO_TERM_QUIET=true
bash /tmp/ci-rust-cache.sh prepare
set -a
source "${GITHUB_ENV}"
+4 -1
View File
@@ -5081,7 +5081,7 @@ for (const step of steps) {
continue;
}
console.log(`[check:native-shells] ${step.label}`);
// 成功不打印进度标签;只有在失败时才知道是哪个 step,避免每个 step 一行刷屏。
const result = spawnSync(step.command, step.args, {
cwd: process.cwd(),
stdio: 'inherit',
@@ -5102,6 +5102,9 @@ for (const step of steps) {
}
if ((result.status ?? 0) !== 0) {
console.error(
`[check:native-shells] ${step.label} failed (exit=${result.status})`,
);
process.exit(result.status ?? 1);
}
}
+4
View File
@@ -94,6 +94,10 @@ export default defineConfig({
test: {
environment: 'node',
globals: true,
// 成功用例不回放被测代码写进 stdout / stderr 的内容:CI 日志里只保留每个
// 失败用例的断言摘要,避免 React act 警告、dev 调度日志这类噪音刷屏。
// 需要在本机排查时用 `vitest run --silent=false` 覆盖本次配置。
silent: true,
minThreads: 1,
maxThreads: 8,
server: {