Skip to content

Run the unit tests on every core in CI - #348

Open
r0ny123 wants to merge 1 commit into
masterfrom
ci/parallel-unit-tests
Open

r0ny123 wants to merge 1 commit into
masterfrom
ci/parallel-unit-tests

Conversation

@r0ny123

@r0ny123 r0ny123 commented Nov 5, 2026 •

Copy link
Copy Markdown
Collaborator

The unit test job runs the suite one test at a time: about 13 minutes on master (the last runs on #347 took 12 to 13). On a branch with the open pull requests merged in, the suite is about 5,300 tests, and the Python 3.12 and 3.13 jobs on #344 hit the job's 20 minute timeout at three quarters of the run with no test failing. Once those PRs land, master's jobs would do the same.

Change. One commit, 4e9cf96.

  • .github/workflows/test.yml: the job also installs pytest-xdist==3.8.0, pinned like pytest and pytest-cov, and runs python -m pytest -n auto.
  • Makefile: make init installs the same, and make test runs pytest -n auto, so it still runs exactly what CI runs.
  • AGENTS.md: the three places that name the dev tools and the test command say so.

The tests do not depend on each other or on their order: the suite is already run with xdist locally, and -n 4 is what every branch's full run in the recent PRs used.

Measured. This branch, python -m pytest -n auto on a 4-core machine: 2494 passed in 4:38, against about 13 minutes serially in CI. ruff check . is clean.

Nothing else changes: pytest.ini, the test files and test-coverage are as they were.

The unit test job runs the suite one test at a time and takes about 13
minutes. On a branch with the open pull requests merged in, the suite is
twice the size and the job hits its 20 minute timeout at three quarters
of the run, with no test failing. The tests are written to be independent
of each other and of their order, and the suite is already run with
pytest-xdist locally.

CI and `make init` now install pytest-xdist, pinned like pytest, and the
job and `make test` run `pytest -n auto`, so `make test` still runs what
CI runs. AGENTS.md says so.
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