Skip to content

Commit c0d1f37

Browse files
committed
ci(tests): use pytest-xdist for all CI tests
1 parent b27ded6 commit c0d1f37

File tree

6 files changed

+13
-4
lines changed

6 files changed

+13
-4
lines changed

.cspell/library_terms.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,7 @@ warpfunctions
179179
weathersit
180180
windspeed
181181
workingday
182+
worksteal
182183
xlabel
183184
xlim
184185
xscale

.github/workflows/coverage.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ jobs:
4848
- name: Debug - uv pip freeze
4949
run: uv pip freeze
5050
- name: Assess coverage of unit tests
51-
run: uv run pytest tests/units tests/test_doctests.py --cov
51+
run: uv run pytest tests/units tests/test_doctests.py --cov -n auto --dist worksteal
5252
- name: Extract total coverage percentage
5353
id: cov
5454
run: |

.github/workflows/release.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,10 +116,10 @@ jobs:
116116
- name: Debug - uv pip freeze
117117
run: uv pip freeze
118118
- name: Test with pytest
119-
run: uv run pytest tests --ignore=tests/test_examples.py
119+
run: uv run pytest tests --ignore=tests/test_examples.py -n auto --dist worksteal
120120
# The example notebooks are slow, so only run if all other tests pass.
121121
- name: Test example notebooks
122-
run: uv run pytest tests/test_examples.py
122+
run: uv run pytest tests/test_examples.py -n auto --dist worksteal
123123
release-github:
124124
name: Create GitHub draft release
125125
needs: test

.github/workflows/unittests.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,8 @@ jobs:
6666
--ignore=tests/test_examples.py
6767
-W "error::vanguard.utils.UnseededRandomWarning"
6868
-m "no_beartype"
69+
-n auto
70+
--dist worksteal
6971
if: matrix.python-version == '3.13'
7072
- name: Test with pytest (and type checking)
7173
run: >
@@ -74,12 +76,16 @@ jobs:
7476
-W "error::vanguard.utils.UnseededRandomWarning"
7577
-m "not no_beartype"
7678
--beartype-packages="vanguard"
79+
-n auto
80+
--dist worksteal
7781
if: matrix.python-version == '3.13'
7882
- name: Run all tests
7983
run: >
8084
uv run pytest
8185
--ignore=tests/test_examples.py
8286
-W "error::vanguard.utils.UnseededRandomWarning"
87+
-n auto
88+
--dist worksteal
8389
if: matrix.python-version != '3.13'
8490
- name: Minimize UV cache
8591
run: uv cache prune --ci

.github/workflows/unittests_lowest.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,8 @@ jobs:
7171
uv run --frozen --no-dev pytest
7272
--ignore=tests/test_examples.py
7373
-W "error::vanguard.utils.UnseededRandomWarning"
74+
-n auto
75+
--dist worksteal
7476
- name: Minimize UV cache
7577
run: uv cache prune --ci
7678
if: always()

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ test = [
5858
"ipykernel>=6", # for notebook tests
5959
"nbconvert>=7", # for notebook tests
6060
"nbformat>=5", # for notebook tests
61-
"tqdm>=4", # for notebook tests
61+
"tqdm>=4", # for notebook tests
6262
"pytest-beartype>=0.1",
6363
"pytest-cov>=5",
6464
"pytest-xdist>=3.6.1",

0 commit comments

Comments
 (0)