2500 tests in my public repository and nothing was running them
说明与用途
公共 Rust 仓库中有 2500 个测试从未运行,因为缺少 CI、工作区中缺失了一个 crate,以及 e2e 脚本失败。添加缺失的 crate、创建 CI 工作流并修复脚本后,测试得以运行,其中一个关键测试现在通过。
问题
A public Rust repository contained 2,500 test cases that were never executed because the CI pipeline was missing, a crate was omitted from the workspace, and an end‑to‑end script failed due to a hard‑coded probe count.
结果
After adding the missing crate and CI configuration, the repository’s test suite became executable, ten critical tests ran and passed, and the end‑to‑end script no longer failed.
工作流
- 1. Verify absence of CI by checking .github/workflows and cargo metadata.
- 2. Identify missing crate in workspace by inspecting Cargo.toml members list.
- 3. Add missing crate to members list and commit.
- 4. Create .github/workflows/ci.yml to run cargo test on PRs.
- 5. Update tools/e2e.sh MIN_PROBES to match actual test count or remove the check.
- 6. Push changes and observe CI execution and test results.
证据
There was no CI. No .github/workflows/ in the tree and none in its history.
One crate was not in the workspace at all. crates/gx-adapter-time was neither in the members list nor in exclude.
The bundled end-to-end script could not pass in the bundled tree. tools/e2e.sh carried a floor of MIN_PROBES=2822 and the tree it shipped with had roughly 2500.
- 记录日期: 2026-09-11T04:46:58.271Z