Skip to content

CI: run the tests in parallel and keep pull-request runs short - #139

Merged
bdbarnett merged 9 commits into
mainfrom
ci/parallel-tests
Oct 13, 2026
Merged

bdbarnett merged 9 commits into
mainfrom
ci/parallel-tests

Conversation

@bdbarnett

@bdbarnett bdbarnett commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor

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 tests python -m unittest discover -s tests -p "test_*.py" finds: 2306 either way. loadscope keeps each class on one worker, in unittest's order, so a setUpClass runs once. tests/conftest.py only 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 setUpClass ran 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=1 keeps 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-deps on the editable installs is unchanged.

Local python -m unittest discover works as before.

@bdbarnett
bdbarnett merged commit 7725463 into main Oct 13, 2026
6 checks passed
@bdbarnett
bdbarnett deleted the ci/parallel-tests branch October 13, 2026 21:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant