Repository navigation
Conversation
The durations come from the "Store test durations" workflow, run on main, and balance the coverage shards now that the coverage check runs qLDPC's compiled functions as plain Python. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…st durations" run It writes the file into the checkout that it runs from, and reports test files that the new file lacks or names that are not test files. It uses GITHUB_TOKEN or GH_TOKEN, or else git's stored credential for github.com, and sends the token only to GitHub's API. The contributing guide and the workflow point to it. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
CI balances the per-module coverage check's shards by the per-test-file durations in
.test_durations. These were measured before the coverage check began running qLDPC's compiled functions as plain Python (#839), so the shards have become uneven. The "Store test durations" workflow (#843) measures them on a CI runner, but downloading its artifact needs a GitHub token. So every re-tune would mean working out the download again by hand.Changes
.test_durationsis replaced by the file from a run of the "Store test durations" workflow onmain.checks/_fetch_test_durations.pydownloads that file from the latest successful run onmainand writes it into the checkout that the script runs from. It reports any test file that the new file lacks, and any name in it that is not a test file. It usesGITHUB_TOKENorGH_TOKENif set, or else the credential that git has stored for github.com. It sends the token only to GitHub's API, not to the storage host that the download redirects to.Testing
The script wrote a file identical to the committed one, and found every test file in it. The run that measured the durations skipped only one test, so no file's duration is understated by skipped tests.