Skip to content

Commit 73ba23a

Browse files
committed
tox: attempt to fix Python versions in testenvs using tox-gh
1 parent 197dd2a commit 73ba23a

2 files changed

Lines changed: 19 additions & 10 deletions

File tree

.github/workflows/ci.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,7 @@ jobs:
4646
uv sync --all-extras
4747
uv pip install codecov
4848
uv tool install \
49-
--python-preference only-managed \
50-
--python ${{ matrix.python }} \
49+
--python-preference only-managed ${{ matrix.python }} \
5150
tox --with tox-uv --with tox-gh
5251
5352

tox.ini

Lines changed: 18 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,11 @@ filename = *.py
2323

2424
[gh]
2525
python =
26-
3.9: 3.9
27-
3.10: 3.10
28-
3.11: 3.11
29-
3.12: 3.12
30-
3.13: 3.13, covclean, lint, coverage, readme
26+
3.9: py39
27+
3.10: py310
28+
3.11: py311
29+
3.12: py312
30+
3.13: py313, covclean, lint, coverage, readme
3131

3232
[pytest]
3333
python_files = test_*.py
@@ -42,7 +42,7 @@ skip_missing_interpreters = true
4242
envlist =
4343
covclean
4444
lint
45-
{3.9,3.10,3.11,3.12,3.13}-{linux,macos}
45+
py{39,310,311,311,313}
4646
coverage
4747
readme
4848
docs
@@ -51,6 +51,12 @@ envlist =
5151
platform =
5252
linux: linux
5353
macos: (macos|osx|darwin)
54+
base_python =
55+
py39: python3.9
56+
py310: python3.10
57+
py311: python3.11
58+
py312: python3.12
59+
py313: python3.13
5460
deps =
5561
pytest
5662
pytest-mock
@@ -63,12 +69,16 @@ deps =
6369
# log level ERROR because we print out info from fixture and -s also prints useless stuff from R
6470
setenv =
6571
OMNIPATH_AUTOLOAD = false
66-
{3.9-linux}: _PYTEST_TOX_POSARGS=--test-server --log-cli-level=ERROR
6772
passenv = TOXENV,CI,CODECOV_*,GITHUB_ACTIONS
6873
usedevelop = true
6974
commands =
7075
pytest --cov --cov-append --cov-config={toxinidir}/.coveragerc --ignore docs/ {posargs:-vv {env:_PYTEST_TOX_POSARGS:}}
7176

77+
[testenv:py313]
78+
setenv =
79+
_PYTEST_TOX_POSARGS=--test-server --log-cli-level=ERROR
80+
81+
7282
[testenv:covclean]
7383
description = Clean coverage files.
7484
deps = coverage
@@ -88,7 +98,7 @@ deps =
8898
coverage
8999
diff_cover
90100
skip_install = true
91-
depends = {3.9,3.10,3.11,3.12,3.13}-{linux,macos}
101+
depends = py{39,310,311,312,313}
92102
parallel_show_output = True
93103
commands =
94104
coverage report --omit="tox/*"

0 commit comments

Comments
 (0)