Skip to content

Commit 570e7f6

Browse files
committed
Run tox and tests in parallel
1 parent df4df5d commit 570e7f6

File tree

3 files changed

+13
-4
lines changed

3 files changed

+13
-4
lines changed

CONTRIBUTING.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ Ready to contribute? Here's how to set up `confidence` for local development.
9595

9696
To test across all supported Python versions (3.9, 3.10, 3.11, 3.12)::
9797

98-
$ uv run tox
98+
$ uv run tox -p auto
9999

100100
Note: tox requires all Python versions to be installed on your system.
101101

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ dev = [
3434
"tox-uv>=1.0.0",
3535
"pytest>=7.0.0",
3636
"pytest-cov>=4.0.0",
37+
"pytest-xdist>=3.0.2",
3738
"coverage>=7.0.0",
3839
]
3940

tox.ini

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ requires = tox-uv
55

66
[gh-actions]
77
python =
8-
3.9: py39, py39-min
8+
3.9: py39-min
99
3.10: py310
1010
3.11: py311
1111
3.12: py312
@@ -15,7 +15,14 @@ extras = dev
1515
commands =
1616
black --check --diff spotify_confidence tests
1717
flake8 spotify_confidence tests
18-
pytest {posargs}
18+
pytest -n auto --no-cov --basetemp={envtmpdir} {posargs}
19+
20+
[testenv:py312]
21+
extras = dev
22+
commands =
23+
black --check --diff spotify_confidence tests
24+
flake8 spotify_confidence tests
25+
pytest -n auto --basetemp={envtmpdir} {posargs}
1926

2027
[testenv:py39-min]
2128
basepython = python3.9
@@ -30,11 +37,12 @@ deps =
3037
flake8==6.0.0
3138
pytest==7.0.0
3239
pytest-cov==4.0.0
40+
pytest-xdist==3.0.2
3341
coverage==7.0.0
3442
commands =
3543
black --check --diff spotify_confidence tests
3644
flake8 spotify_confidence tests
37-
pytest {posargs}
45+
pytest -n auto --no-cov --basetemp={envtmpdir} {posargs}
3846

3947
[flake8]
4048
max-line-length = 120

0 commit comments

Comments
 (0)