Skip to content

ci(regression): measure the lane's coverage nightly instead of on every push - #2031

Merged
dgunning merged 1 commit into
mainfrom
ci/regression-coverage-nightly
Nov 23, 2026
Merged

dgunning merged 1 commit into
mainfrom
ci/regression-coverage-nightly

Conversation

@dgunning

Copy link
Copy Markdown
Owner

Push runs of the regression lane on main spend about half their time measuring coverage. This moves that measurement to a nightly run.

Why

The last nine completed push runs on main took 25–37 min. The same tests on a pull request, without --cov, take 12–19 min. A push run exists to say quickly whether main is red ("Report red main" files the issue when it finishes), and the coverage number doesn't need to be per-commit.

What changes

Trigger Before After
Pull request no coverage unchanged
Push to main --cov, Codecov upload no coverage, no upload
Schedule weekly, Sunday 08:00 UTC, with coverage nightly, 08:00 UTC, with coverage
Manual dispatch with coverage unchanged

New codecov.yml turns on carryforward for the regression flag. Without it, merge commits between nightly runs would show a total without this lane's lines. Everything else stays at Codecov's defaults, since the repo had no config before.

Not affected

  • Pull requests: they already ran without coverage, so the required Regression gate is no faster or slower.
  • The 65% coverage floor: it's enforced in Combine Coverage (python-hatch-workflow.yml) from the fast, network and slow lanes, not this one.

Verification

  • Both files parse as YAML, and Codecov's validator (codecov.io/validate) accepts codecov.yml.
  • I ran the step's if with each event name substituted:
    • pull_request and push run without coverage.
    • schedule and workflow_dispatch run with --cov --cov-report=xml.
  • This PR changes the workflow file, so the full regression lane runs on it.
  • What only main can show: the first push run after merge should finish in about 12–19 min, and the first nightly should upload under regression.

Made with Claude Code (Claude Opus 5.5).

🤖 Generated with Claude Code

…ry push

Push runs of the regression lane on main took 25-37 min with --cov
(the last nine completed runs) against 12-19 min for the same tests on
a pull request without it. A push run's job is to say quickly whether
main is red; the coverage number can wait for the night.

Push runs now use the pull-request command, without --cov, and skip the
Codecov upload. The schedule moves from weekly (Sunday) to nightly, at
08:00 UTC, an hour after python-hatch-workflow.yml's nightly run, and
that run and manual dispatches keep coverage and the upload.

codecov.yml (new; everything else stays at Codecov's defaults) turns on
carryforward for the `regression` flag, so a commit with no regression
upload reuses the last one instead of dropping this lane's lines from
its total. Codecov's validator accepts the file.

The 65% floor is unaffected: Combine Coverage in python-hatch-workflow.yml
enforces it from the fast, network and slow lanes. Pull requests are
unaffected too; they already ran without coverage.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@dgunning
dgunning merged commit deacab6 into main Nov 23, 2026
13 checks passed
@dgunning
dgunning deleted the ci/regression-coverage-nightly branch November 23, 2026 02:34
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.

1 participant