Skip to content

Commit 83e1bec

Browse files
chore: Use Tox 4.61+ labeled ranges to generate environment matrix (#169)
Signed-off-by: Edgar Ramírez Mondragón <edgarrm358@gmail.com>
1 parent 7f74b2b commit 83e1bec

2 files changed

Lines changed: 9 additions & 10 deletions

File tree

‎.github/workflows/test.yml‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,20 +52,20 @@ jobs:
5252
- name: Run tests with PyTest 9
5353
run: tox
5454
env:
55-
TOXENV: ${{ matrix.python-version }}-pytest-9
55+
TOXENV: ${{ matrix.python-version }}-pytest9
5656
PYTEST_PLUGINS: pytest_github_actions_annotate_failures,rerunfailures,xdist
5757

5858
- name: Run tests with PyTest 8
5959
run: tox
6060
env:
61-
TOXENV: ${{ matrix.python-version }}-pytest-8
61+
TOXENV: ${{ matrix.python-version }}-pytest8
6262
PYTEST_PLUGINS: pytest_github_actions_annotate_failures,rerunfailures,xdist
6363

6464
- name: Run tests with PyTest 7
6565
run: tox
6666
if: runner.os != 'Windows'
6767
env:
68-
TOXENV: ${{ matrix.python-version }}-pytest-7
68+
TOXENV: ${{ matrix.python-version }}-pytest7
6969
PYTEST_PLUGINS: pytest_github_actions_annotate_failures,rerunfailures,xdist
7070

7171
post-test:

‎tox.toml‎

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,24 @@
11
requires = [
2-
"tox>=4.49",
2+
"tox>=4.61",
33
"tox-uv",
44
]
55
env_list = [
66
{ product = [
77
{ prefix = "py3", start = 10 },
8-
["pytest"],
9-
{ pytestver = ["7", "8", "9"] },
8+
{ pytestver = { prefix = "pytest", start = 7, stop = 9 } },
109
] },
1110
]
1211

1312
[env_run_base]
14-
description = "run tests with Python {py_dot_ver} and pytest {factor:pytestver}"
13+
description = "run tests with Python {py_dot_ver} and {factor:pytestver}"
1514
deps = [
16-
{ replace = "if", condition = "factor['9']", then = [
15+
{ replace = "if", condition = "factor['pytest9']", then = [
1716
"pytest>=9.0.0,<10.0.0",
1817
], extend = true },
19-
{ replace = "if", condition = "factor['8']", then = [
18+
{ replace = "if", condition = "factor['pytest8']", then = [
2019
"pytest>=8.0.0,<9.0.0",
2120
], extend = true },
22-
{ replace = "if", condition = "factor['7']", then = [
21+
{ replace = "if", condition = "factor['pytest7']", then = [
2322
"pytest>=7.0.0,<8.0.0",
2423
"pytest-rerunfailures<16.2",
2524
], extend = true },

0 commit comments

Comments
 (0)