Skip to content

ci: run tests in parallel with pytest-xdist#10

Merged
wrignj08 merged 1 commit into
mainfrom
ci/pytest-xdist
Jul 2, 2026
Merged

ci: run tests in parallel with pytest-xdist#10
wrignj08 merged 1 commit into
mainfrom
ci/pytest-xdist

Conversation

@wrignj08

@wrignj08 wrignj08 commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

Summary

Enable parallel test execution with pytest-xdist — parallel by default locally, capped at -n 2 in CI.

  • pyproject.toml — add pytest-xdist>=3.8.0 to the dev group.
  • pytest.ini — local default -n auto --dist worksteal: fans out across all cores, and worksteal rebalances the heavy Water-sweep / fuzz tests so one worker doesn't get stuck with them. Full suite ~76s → ~51s locally.
  • CI (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.
  • README — document the parallel default and -n 0 to serialise for debugging.

Verification

  • Local default → 16 workers, 436 passed (~51s).
  • CI-style -n 2 → override honored (2 workers).
  • Notebook smoke test under -n 2 → 4 notebooks pass.

uv.lock is gitignored, so CI resolves pytest-xdist fresh from pyproject.toml.

🤖 Generated with Claude Code

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>
@wrignj08
wrignj08 merged commit c9f6245 into main Jul 2, 2026
10 checks passed
@wrignj08
wrignj08 deleted the ci/pytest-xdist branch July 2, 2026 05:23
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