Skip to content

CI: collect coverage only in the job that uploads it - #598

Merged
dweindl merged 1 commit into
PEtab-dev:mainfrom
dweindl:ci-coverage-single-job
Nov 16, 2026
Merged

dweindl merged 1 commit into
PEtab-dev:mainfrom
dweindl:ci-coverage-single-job

Conversation

@dweindl

@dweindl dweindl commented Nov 16, 2026

Copy link
Copy Markdown
Member

Only the ubuntu / Python 3.14 job uploads coverage to Codecov, but all jobs ran the tests with --cov. That slows down the other jobs considerably on Python < 3.14: with branch = True (.coveragerc), coverage.py can't use its sys.monitoring-based core there and falls back to the slower C tracer. E.g., pytest took 225 s on ubuntu / 3.12 vs. 102 s on 3.14; locally, test_add_noise on 3.12 took 33 s without and 127 s with coverage.

Now, --cov is only passed in the job that uploads the report. The Codecov report is unaffected.

🤖 Generated with Claude Code

Only the ubuntu / Python 3.14 job uploads coverage to Codecov.
Collecting it in the other jobs only slows them down, in particular on
Python < 3.14: with `branch = True`, coverage.py can't use its
`sys.monitoring`-based core there and falls back to the slower C
tracer. E.g., pytest took 225 s on ubuntu / 3.12 vs 102 s on 3.14.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@codecov-commenter

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 79.71%. Comparing base (335ba47) to head (c420a57).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #598   +/-   ##
=======================================
  Coverage   79.71%   79.71%           
=======================================
  Files          70       70           
  Lines        8315     8315           
  Branches     1506     1506           
=======================================
  Hits         6628     6628           
  Misses       1198     1198           
  Partials      489      489           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@dweindl
dweindl marked this pull request as ready for review November 16, 2026 19:27
@dweindl
dweindl requested a review from a team as a code owner November 16, 2026 19:27
@dweindl
dweindl merged commit 824d280 into PEtab-dev:main Nov 16, 2026
8 checks passed
@dweindl
dweindl deleted the ci-coverage-single-job branch November 16, 2026 19:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants