Skip to content

Add a workflow, run by hand, that measures .test_durations on a CI runner - #843

Merged
perlinm merged 1 commit into
mainfrom
ci/store-test-durations-workflow
Nov 12, 2026
Merged

perlinm merged 1 commit into
mainfrom
ci/store-test-durations-workflow

Conversation

@perlinm

@perlinm perlinm commented Nov 12, 2026

Copy link
Copy Markdown
Collaborator

Motivation

CI splits the per-module coverage check into shards, balanced by the per-test-file durations in .test_durations (see checks/coverage_.py --shard). These durations go stale as tests change. They have changed most recently because the coverage check now runs qLDPC's compiled functions as plain Python (#839). Measuring them on a developer's machine is unreliable, since it can differ from a CI runner in speed, Python version, and optional dependencies. For example, the gap extra installs only on Python 3.13, while CI runs 3.14.

Changes

  • .github/workflows/test-durations.yaml is a workflow that runs only when started from the Actions tab. It sets up the environment as the coverage job does, runs the whole coverage check unsharded with --store-durations --clean-durations, and uploads .test_durations as an artifact to commit. The upload sets include-hidden-files, since the action skips files whose names start with a dot.
  • The coverage job's comment in continuous-integration.yaml points to the new workflow.

Additional notes

The workflow copies the coverage job's set-up, so a change to one should be made to the other; its header says so. Once this merges, one run of the workflow produces the new .test_durations, which a follow-up PR commits.

…nner

It runs the whole coverage check unsharded with --store-durations --clean-durations, set up as the
coverage job is, and uploads .test_durations to commit.  Local timings differ from a CI runner's in
speed, Python version, and optional dependencies.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@perlinm
perlinm merged commit 295fedc into main Nov 12, 2026
8 checks passed
@perlinm
perlinm deleted the ci/store-test-durations-workflow branch November 12, 2026 15:02
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