Repository navigation
CI: run the tests in parallel and keep pull-request runs short - #139
Merged
Merged
Conversation
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.
The test job ran the suite serially, 45 to 90 minutes a job. This runs the same tests in parallel and trims what a pull request waits for.
The suite now runs under pytest with pytest-xdist (
-n auto --dist loadscope), collecting exactly the testspython -m unittest discover -s tests -p "test_*.py"finds: 2306 either way. loadscope keeps each class on one worker, in unittest's order, so asetUpClassruns once.tests/conftest.pyonly reorders: the slowest files start first. The release gate in publish-release-packages.yml runs the suite the same way.The lifecycle matrix was the one test that bound the whole run: its
setUpClassran the CPython matrix for every class in one process, half an hour on a runner. It now runs each class, rate, channel count and patch in a process of its own and joins the lines in the original order, which parse identically to the serial run for all eight classes.LIFECYCLE_JOBS=1keeps the old in-process run.Pull requests run ubuntu, windows and macos on 3.13. Pushes to main and manual runs (
workflow_dispatch, new) keep the full 3.11 to 3.14 matrix. A new push to a pull request cancels the run it replaces, in Tests and Lint; pushes to main each run to the end.The audiodsp wheel is built once per pin, OS, architecture and Python and cached.
--no-depson the editable installs is unchanged.Local
python -m unittest discoverworks as before.