Skip to content

Commit

Permalink
tests: add pytest-xdist for parallel test execution
Browse files Browse the repository at this point in the history
  • Loading branch information
rg936672 committed Feb 7, 2025
1 parent 94a1a2d commit 01e64d4
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 3 deletions.
1 change: 1 addition & 0 deletions .cspell/library_terms.txt
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,7 @@ vars
viewcode
vmap
vmaps
worksteal
writebytes
xlabel
ylabel
2 changes: 1 addition & 1 deletion .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ jobs:
- name: Debug - uv pip freeze
run: uv pip freeze
- name: Assess coverage of unit tests
run: uv run pytest tests/unit --cov
run: uv run pytest tests/unit -n auto --dist worksteal --cov
- name: Extract total coverage percentage
id: cov
run: |
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/unittests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,10 @@ jobs:
- name: Debug - uv pip freeze
run: uv pip freeze
- name: Test with pytest
run: uv run pytest --ignore=tests/integration
run: uv run pytest --ignore=tests/integration -n auto --dist worksteal
# Integration tests are slow, so only run if all other tests pass.
- name: Test integration tests
run: uv run pytest tests/integration
run: uv run pytest tests/integration -n auto --dist worksteal
- name: Minimize UV cache
run: uv cache prune --ci
if: always()
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ test = [
"pytest>=8",
"pytest-cov>=6",
"pytest-rerunfailures>=15",
"pytest-xdist>=3",
"scipy>=1.13",
]
# Compile documentation
Expand Down
24 changes: 24 additions & 0 deletions uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 01e64d4

Please sign in to comment.