Skip to content

Commit 51a8d55

Browse files
authored
Merge pull request #959 from gchq/feature/pytest-xdist
Add pytest-xdist for parallel test execution
2 parents 8cfa213 + 01e64d4 commit 51a8d55

File tree

5 files changed

+29
-3
lines changed

5 files changed

+29
-3
lines changed

.cspell/library_terms.txt

+1
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,7 @@ vars
153153
viewcode
154154
vmap
155155
vmaps
156+
worksteal
156157
writebytes
157158
xlabel
158159
ylabel

.github/workflows/coverage.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ jobs:
5050
- name: Debug - uv pip freeze
5151
run: uv pip freeze
5252
- name: Assess coverage of unit tests
53-
run: uv run pytest tests/unit --cov
53+
run: uv run pytest tests/unit -n auto --dist worksteal --cov
5454
- name: Extract total coverage percentage
5555
id: cov
5656
run: |

.github/workflows/unittests.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -60,10 +60,10 @@ jobs:
6060
- name: Debug - uv pip freeze
6161
run: uv pip freeze
6262
- name: Test with pytest
63-
run: uv run pytest --ignore=tests/integration
63+
run: uv run pytest --ignore=tests/integration -n auto --dist worksteal
6464
# Integration tests are slow, so only run if all other tests pass.
6565
- name: Test integration tests
66-
run: uv run pytest tests/integration
66+
run: uv run pytest tests/integration -n auto --dist worksteal
6767
- name: Minimize UV cache
6868
run: uv cache prune --ci
6969
if: always()

pyproject.toml

+1
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ test = [
6666
"pytest>=8",
6767
"pytest-cov>=6",
6868
"pytest-rerunfailures>=15",
69+
"pytest-xdist>=3",
6970
"scipy>=1.13",
7071
]
7172
# Compile documentation

uv.lock

+24
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)