From cb139ee20de74e1e8c377160b88f4d8c3ac1c42f Mon Sep 17 00:00:00 2001 From: jxxghp Date: Thu, 27 Aug 2026 22:32:33 +0800 Subject: [PATCH] ci: allow full coverage report to finish --- .github/workflows/test.yml | 2 +- docs/development-setup.md | 4 +++- tests/test_architecture_ci.py | 2 ++ 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 15bc0b466..c4ca55f10 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -143,7 +143,7 @@ jobs: run: uv sync --locked - name: Generate coverage reports - timeout-minutes: 10 + timeout-minutes: 15 run: | uv run --locked --no-sync python -m coverage erase uv run --locked --no-sync python -m coverage run tests/run.py --serial diff --git a/docs/development-setup.md b/docs/development-setup.md index fb5cf4975..9b9e2a567 100644 --- a/docs/development-setup.md +++ b/docs/development-setup.md @@ -200,7 +200,9 @@ uvx --from pip-audit==2.10.1 pip-audit \ 并启动 4 个独立 pytest 进程;GitHub Actions 使用同一入口的 `--shard N/TOTAL` 参数启动对应分片。需要单进程调试时使用 `python tests/run.py --serial`。Coverage job 会在 `v3` 的 PR / push 中串行运行同一全量入口,并检查 Application 与 Domain 的 - 已提交低水位;它不是只在手工触发时运行的建议性报告。 + 已提交低水位;它不是只在手工触发时运行的建议性报告。该 job 总预算为 20 分钟, + 其中全量测试及报告生成 step 预算为 15 分钟,用于容纳 Ubuntu Runner 的性能波动, + 不得通过跳过测试文件或覆盖率产物规避超时。 4. **运行架构与静态门禁**:主仓架构检查不依赖独立插件仓;官方插件兼容观察单独运行, 任何检查命令都不会写入 fixture。 diff --git a/tests/test_architecture_ci.py b/tests/test_architecture_ci.py index fcaeb5fab..07f30f316 100644 --- a/tests/test_architecture_ci.py +++ b/tests/test_architecture_ci.py @@ -92,6 +92,7 @@ def test_coverage_job_runs_full_suite_and_read_only_ratchet() -> None: assert workflow["on"]["push"]["branches"] == ["v3"] assert "workflow_dispatch" in workflow["on"] assert coverage_job["runs-on"] == "ubuntu-latest" + assert coverage_job["timeout-minutes"] == 20 assert "if" not in coverage_job setup_step = next(step for step in steps if step.get("name") == "Set up uv") @@ -101,6 +102,7 @@ def test_coverage_job_runs_full_suite_and_read_only_ratchet() -> None: generate_step = next( step for step in steps if step.get("name") == "Generate coverage reports" ) + assert generate_step["timeout-minutes"] == 15 upload_step = next( step for step in steps if step.get("name") == "Upload coverage report" )