ci: run tests in parallel with pytest-xdist#10
Merged
Merged
Conversation
Add pytest-xdist to the dev group and enable parallel test execution. - Local default: `-n auto --dist worksteal` in pytest.ini, so `pytest` fans out across all cores (worksteal rebalances the heavy Water-sweep and fuzz tests). Full suite ~76s -> ~51s locally. - CI: `-n 2` overrides the auto default. GitHub runners have 4 vCPUs and some tests spawn smoothify's own worker pool, so a smaller fan-out avoids oversubscribing the runner. - README: note the parallel default and `-n 0` to serialise for debugging. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.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.
Summary
Enable parallel test execution with
pytest-xdist— parallel by default locally, capped at-n 2in CI.pyproject.toml— addpytest-xdist>=3.8.0to the dev group.pytest.ini— local default-n auto --dist worksteal: fans out across all cores, andworkstealrebalances the heavy Water-sweep / fuzz tests so one worker doesn't get stuck with them. Full suite ~76s → ~51s locally.ci.yml) — both test steps pass-n 2, overriding the auto default. GitHub runners have 4 vCPUs and several tests spawn smoothify's own worker pool (num_cores=2/0), so a smaller fan-out avoids oversubscribing the runner.-n 0to serialise for debugging.Verification
-n 2→ override honored (2 workers).-n 2→ 4 notebooks pass.uv.lockis gitignored, so CI resolvespytest-xdistfresh frompyproject.toml.🤖 Generated with Claude Code