配置:CI 测试成功静默改用 cargo/node 原生 quiet
- .gitea/workflows/project-ci.yml:全局加 CARGO_TERM_QUIET=true,cargo test 成功只打点号、失败才列用例名。 - scripts/build-gitea-rust-cache.sh:预热脚本同步 CARGO_TERM_QUIET=true,与 workflow 的 Cargo 环境一致。 - package.json:agc:plugins:test 改用 node --test --test-reporter=dot。 - apps/ai-game-creator-shell/package.json:bundled-resources:test 改用 node --test --test-reporter=dot。 - scripts/check-native-shells.mjs:去掉每个 step 的成功进度标签,失败时才打印标签。 - scripts/project-ci-workflow.test.ts:移除 silent: true 守护用例。 - docs/project-memory/shared-memory/decision-log.md:移除本次静默决策条目。 - docs/project-memory/shared-memory/development-workflow.md:移除本次静默说明段落。
This commit is contained in:
@@ -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}"
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -75,12 +75,6 @@ const jobsWithoutNpmInstall: readonly string[] = [
|
||||
const rootPackageJson = JSON.parse(
|
||||
readFileSync(resolve(process.cwd(), 'package.json'), 'utf8'),
|
||||
) as { scripts?: Record<string, string> };
|
||||
// 前端与 AGC 的 CI 测试都跑根 vitest 配置(`vitest.frontend-ci.config.ts` 也 merge 它),
|
||||
// 这里钉住「成功用例静默」,避免有人顺手删掉后 CI 日志重新被 act 警告与 dev 日志刷屏。
|
||||
const rootVitestConfig = readFileSync(
|
||||
resolve(process.cwd(), 'vitest.config.ts'),
|
||||
'utf8',
|
||||
);
|
||||
const nativeShellGateScript = readFileSync(
|
||||
resolve(process.cwd(), 'scripts/check-native-shells.mjs'),
|
||||
'utf8',
|
||||
@@ -546,10 +540,6 @@ describe('project CI workflow', () => {
|
||||
).toHaveLength(2);
|
||||
});
|
||||
|
||||
it('keeps passing CI tests silent so only failures reach the log', () => {
|
||||
expect(rootVitestConfig).toMatch(/^\s*silent:\s*true,$/mu);
|
||||
});
|
||||
|
||||
it('keeps frontend, operations fixture, and native shell gates in dedicated jobs', () => {
|
||||
const frontendJob = jobSection('frontend-tests');
|
||||
expect(frontendJob).toMatch(/^ {8}run: npm run test:ci:frontend$/mu);
|
||||
|
||||
Reference in New Issue
Block a user