Skip to content

Use 2 workers for tests in CI - #7150

Merged
snejus merged 1 commit into
masterfrom
use-two-workers-for-tests-in-ci
Nov 2, 2026
Merged

snejus merged 1 commit into
masterfrom
use-two-workers-for-tests-in-ci

Conversation

@snejus

@snejus snejus commented Nov 2, 2026

Copy link
Copy Markdown
Member

Run CI tests on two xdist workers on every matrix job ⚡

-n auto lets the pytest_xdist_auto_num_workers hook in test/conftest.py:105 choose the worker count. That hook drops to a single process whenever -k is passed, so it can keep focused local runs predictable. The "Test without coverage" step runs poe test -k 'not test_convert_rst_to_md', which means 9 of the 10 matrix jobs (every non-main Python on Ubuntu and all the Windows ones) have been running the whole suite serially. This PR pins those jobs to two workers.

Copilot AI balanced review requested due to automatic review settings November 2, 2026 14:16
@snejus
snejus requested a review from a team as a code owner November 2, 2026 14:16

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

No active review issues are reported for the change that pins both CI test commands to two xdist workers.

No open issues 🎉

What changed in this PR

CI tests now use two xdist workers across all matrix jobs. Grug sees this avoids the single-worker fallback caused by -k in runs without coverage.

Changes:

  • Add -n2 to tests without coverage, keeping the existing test filter.
  • Add -n2 to tests with coverage.
File Description
.github/​workflows/​ci.yaml Pin both test commands to two xdist workers.

Review effort: Balanced

@snejus
snejus merged commit 840471f into master Nov 2, 2026
26 checks passed
@snejus
snejus deleted the use-two-workers-for-tests-in-ci branch November 2, 2026 14:51
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.

2 participants