Commit 5dfdee3
authored
[CI]: Improve CI and split out coverage as separate workflow (#29)
## Description
Separates coverage analysis from the CI test workflow into an
independent `coverage.yml` workflow, and applies several CI hardening
improvements.
**Changes:**
- **Split coverage into `coverage.yml`**: Coverage collection,
reporting, and threshold enforcement now run in a dedicated workflow
with a single Python 3.12 job, independent from the test matrix. This
gives separate status checks in PRs — `CI` for correctness, `Coverage`
for quality — enabling independent branch protection policies (e.g.,
requiring CI but making coverage advisory).
- **Remove `--cov` from test workflow**: The `test` job in `ci.yml` now
runs plain `pytest` without coverage instrumentation, simplifying the
job and slightly improving test performance.
- **Add `needs: lint` to test job**: Tests now wait for lint to pass
before running, avoiding wasted compute on 3 matrix jobs when the code
doesn't lint.
- **Add `timeout-minutes: 10` to all jobs**: Prevents hung jobs from
consuming runners for the default 6-hour limit.
- **Coverage Job Summary**: The coverage workflow writes a markdown
coverage table directly to the GitHub Actions Job Summary page,
providing visibility without external services or artifact downloads.
- **Separated failure signals**: Test failures and coverage threshold
failures produce distinct step-level signals in the coverage workflow.
The threshold is enforced via `pyproject.toml` `[tool.coverage.report]
fail_under` (DRY — single source of truth).
## Breaking changes
None. No changes to runtime code, test code, or pyproject.toml
configuration. Branch protection rules may need updating to add the new
`Coverage` status check if desired.
## Checklist
- [x] `pre-commit run --all-files` passes
- [x] Tests added or updated for changes <!-- No test changes needed —
CI workflow only -->
- [x] Documentation updated <!-- Self-documenting: workflow comments
explain non-obvious behaviors -->1 parent 23f1f18 commit 5dfdee3
2 files changed
Lines changed: 60 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| 19 | + | |
19 | 20 | | |
20 | 21 | | |
21 | 22 | | |
| |||
48 | 49 | | |
49 | 50 | | |
50 | 51 | | |
| 52 | + | |
51 | 53 | | |
| 54 | + | |
52 | 55 | | |
53 | 56 | | |
54 | 57 | | |
| |||
76 | 79 | | |
77 | 80 | | |
78 | 81 | | |
79 | | - | |
80 | | - | |
| 82 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
0 commit comments