mirror of
https://github.com/headroomlabs-ai/headroom.git
synced 2026-08-10 14:27:00 -04:00
ci: upload main test-shard coverage to codecov
Included in this PR because its codecov/patch check exposed the gap: the only coverage codecov receives today comes from the two native-e2e workflows, which run 3 CLI test files between them. The main 4-shard suite — where this PR's budget regression tests run and pass, covering 100% of the new record_tokens block — uploads nothing. Head coverage therefore reads ~6% against a 65% base recorded when uploads were broader, and codecov/patch fails for ANY diff not touched by those 3 files: a false negative on every PR. Add --cov=headroom + per-shard XML report to the test matrix and upload each shard with the same codecov-action@v4 pattern the e2e workflows already use (fail_ci_if_error: false). Codecov merges the four shard sessions into one head report. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
parent
9ed6b082fb
commit
120696e54e
1 changed files with 14 additions and 0 deletions
14
.github/workflows/ci.yml
vendored
14
.github/workflows/ci.yml
vendored
|
|
@ -191,12 +191,26 @@ jobs:
|
|||
cp "${SITE}/headroom/"_core*.so headroom/
|
||||
python -c "from headroom._core import DiffCompressor; print('headroom._core OK')"
|
||||
|
||||
# Coverage upload: without this, codecov only receives reports from
|
||||
# the two native-e2e workflows (3 CLI test files total), so head
|
||||
# coverage reads ~6% and codecov/patch fails for ANY diff not
|
||||
# exercised by those files — a false negative on every PR. The main
|
||||
# suite runs here; its coverage must be what codecov sees.
|
||||
- name: Run test shard ${{ matrix.shard }}/4
|
||||
run: |
|
||||
pytest tests scripts/tests \
|
||||
--splits 4 --group ${{ matrix.shard }} \
|
||||
--cov=headroom --cov-report=xml:coverage-shard-${{ matrix.shard }}.xml \
|
||||
--tb=short -q
|
||||
|
||||
- name: Upload coverage to Codecov
|
||||
uses: codecov/codecov-action@v4
|
||||
with:
|
||||
file: ./coverage-shard-${{ matrix.shard }}.xml
|
||||
flags: unit
|
||||
name: test-shard-${{ matrix.shard }}
|
||||
fail_ci_if_error: false
|
||||
|
||||
test-extras:
|
||||
needs: [changes, build-wheel]
|
||||
if: needs.changes.outputs.code == 'true'
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue