Repository navigation
ci(coverage): report test coverage from a workflow (#1063) - #1064
Conversation
|
Cross-review verdict on
Confirmed:
|
611264b to
c0d4219
Compare
|
Cross-review verdict on
|
|
Verdict withdrawn — NEEDS CHANGES on The coverage-measured Python 3.14 leg failed on both heads:
Both died in |
- unit-tests.yml: the `test` job's Python 3.14 leg (matrix key `coverage: true`) runs its unchanged pytest selection under `coverage run --rcfile=.github/coverage.toml`, writes the total and a per-package table to the job summary, and uploads the HTML report and the bare numbers as artifacts. The first line flags failed tests. - New coverage-comment.yml (workflow_run on Unit Tests, runs no tests) turns those numbers into one PR comment, edited on later pushes. It stays out of unit-tests.yml because that file is reusable and its callers grant only `contents: read`. The PR number comes from the API, and the artifact is validated, never executed. - .github/coverage.toml repeats pyproject.toml's coverage settings and adds `parallel` and `patch = ["subprocess"]`, so xdist workers are measured, and `core = "ctrace"`: sysmon's per-generation state under the suite's pcapkit re-imports OOM-killed the runner; tests/project/test_coverage_rcfile.py guards the repetition. - workflows.rst / releasing.rst: document the above, re-point line refs. tests/project and tests/test_tier_guard.py pass locally (427 passed).
c0d4219 to
412ea8e
Compare
|
Cross-review verdict on
|
make pylint,make mypy,make isort)make testpasses, and a test case covers the change —tests/project+tests/test_tier_guard.pypass locally (388 passed); the full suite is left to CIWhat is the purpose of your pull request?
fix— corrects a defectfeat— adds a featureperf— changes performance, not behaviourrefactor— changes neither behaviour nor performancetest— tests onlydocs— documentation onlyci— workflows or build toolingchore— anything elseDescription of your pull request and other information
Closes #1063. Coverage runs inside the existing
testleg for Python 3.14 (coverage: true), so no leg is added. That leg had the most headroom onmain: 15.6–16.8 min across 3 runs.coverage run --rcfile=.github/coverage.toml. That rcfile repeatspyproject.toml's settings and addsparallelandpatch = ["subprocess"], pluscore = "ctrace". Under the default sys.monitoring core, the suite's pcapkit re-imports grewtest_http_unit.py's peak RSS from 0.40 to 4.17 GiB (ctrace: 0.41), and that killed the runner on the first two heads.tests/corekit/test_multidict.py -n 2: without the patch, only the controller is measured (1 data file,multidict.py20%). With it, 3 files are combined andmultidict.pyreaches 100%.coverage-htmlartifact (30 days) and acoverage-summarynumbers artifact.coverage-comment.yml. It runs onworkflow_runand runs no tests, so it is consistent with the no-separate-coverage-run ruling. It is not inunit-tests.ymlbecause that file is reusable and its callers grant onlycontents: read.main.tests/protocols/application -n 2. That puts the leg at roughly 22–25 min against its 45-min cap.