Skip to content

Commit 856eb10

Browse files
committed
Simplify GitHub action
1 parent 929982d commit 856eb10

File tree

3 files changed

+30
-38
lines changed

3 files changed

+30
-38
lines changed

.github/workflows/main.yml

Lines changed: 15 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -30,41 +30,21 @@ jobs:
3030
with:
3131
python-version: ${{ matrix.python }}
3232

33-
- name: Test with Python 3.9
34-
if: matrix.python == '3.9'
35-
run: uvx --from 'tox>=4.26,<5' tox run -x "tox.envlist=py39-pytest{60,61,62,70,71,72,73,74,80,81,82,83,84}"
36-
37-
- name: Test with PyPy 3.9
38-
if: matrix.python == 'pypy3.9'
39-
run: uvx --from 'tox>=4.26,<5' tox run -x "tox.envlist=pypy39-pytest{60,61,62,70,71,72,73,74,80,81,82,83,84}"
40-
41-
- name: Test with Python 3.10
42-
if: matrix.python == '3.10'
43-
run: uvx --from 'tox>=4.31,<5' tox run -x "tox.envlist=py310-pytest{70,71,72,73,74,80,81,82,83,84}"
44-
45-
- name: Test with PyPy 3.10
46-
if: matrix.python == 'pypy3.10'
47-
run: uvx --from 'tox>=4.31,<5' tox run -x "tox.envlist=pypy310-pytest{70,71,72,73,74,80,81,82,83,84}"
48-
49-
- name: Test with Python 3.11
50-
if: matrix.python == '3.11'
51-
run: uvx --from 'tox>=4.31,<5' tox run -x "tox.envlist=py311-pytest{73,74,80,81,82,83,84}"
52-
53-
- name: Test with PyPy 3.11
54-
if: matrix.python == 'pypy3.11'
55-
run: uvx --from 'tox>=4.31,<5' tox run -x "tox.envlist=pypy311-pytest{73,74,80,81,82,83,84}"
56-
57-
- name: Test with Python 3.12
58-
if: matrix.python == '3.12'
59-
run: uvx --from 'tox>=4.31,<5' tox run -x "tox.envlist=py312-pytest{74,80,81,82,83,84}"
60-
61-
- name: Test with Python 3.13
62-
if: matrix.python == '3.13'
63-
run: uvx --from 'tox>=4.31,<5' tox run -x "tox.envlist=py313-pytest{84}"
64-
65-
- name: Test with Python 3.14
66-
if: matrix.python == '3.14'
67-
run: uvx --from 'tox>=4.31,<5' tox run -x "tox.envlist=py314-pytest{84}"
33+
- name: Run tests for ${{ matrix.python }}
34+
run: |
35+
case "${{ matrix.python }}" in
36+
'3.9') ENVS="py39-pytest{60,61,62,70,71,72,73,74,80,81,82,83,84}" ;;
37+
'pypy3.9') ENVS="pypy39-pytest{60,61,62,70,71,72,73,74,80,81,82,83,84}" ;;
38+
'3.10') ENVS="py310-pytest{70,71,72,73,74,80,81,82,83,84}" ;;
39+
'pypy3.10') ENVS="pypy310-pytest{70,71,72,73,74,80,81,82,83,84}" ;;
40+
'3.11') ENVS="py311-pytest{73,74,80,81,82,83,84}" ;;
41+
'pypy3.11') ENVS="pypy311-pytest{73,74,80,81,82,83,84}" ;;
42+
'3.12') ENVS="py312-pytest{74,80,81,82,83,84}" ;;
43+
'3.13') ENVS="py313-pytest{84}" ;;
44+
'3.14') ENVS="py314-pytest{84}" ;;
45+
*) echo "Unsupported python: ${{ matrix.python }}" ; exit 1 ;;
46+
esac
47+
uvx --from 'tox>=4.26,<5' tox run -x "tox.envlist=${ENVS}"
6848
6949
- name: Lint everything with Ruff
7050
if: matrix.python == '3.14'

pyproject.toml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ classifiers = [
2020
"Operating System :: MacOS :: MacOS X",
2121
"Operating System :: Microsoft :: Windows",
2222
"Operating System :: POSIX",
23+
"Framework :: Pytest",
24+
"Framework :: Pytest :: Plugin",
2325
"Programming Language :: Python :: 3",
2426
"Programming Language :: Python :: 3 :: Only",
2527
"Programming Language :: Python :: 3.9",
@@ -78,4 +80,12 @@ skip-magic-trailing-comma = false
7880
docstring-code-format = true
7981

8082
[tool.pytest.ini_options]
81-
minversion = "6"
83+
minversion = "6"
84+
85+
[tool.coverage.run]
86+
branch = true
87+
source = ["src/pytest_describe"]
88+
89+
[tool.coverage.report]
90+
fail_under = 100
91+
show_missing = true

tox.ini

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ commands = pytest test {posargs}
3333

3434
[testenv:lint]
3535
basepython = python3.14
36+
package = skip
3637
deps =
3738
ruff>=0.6,<0.7
3839
commands =
@@ -41,6 +42,7 @@ commands =
4142

4243
[testenv:format]
4344
basepython = python3.14
45+
package = skip
4446
deps =
4547
ruff>=0.6,<0.7
4648
commands =
@@ -52,7 +54,7 @@ deps =
5254
coverage
5355
pytest
5456
commands =
55-
coverage run --source=pytest_describe,test -m pytest test {posargs}
56-
coverage report -m --fail-under=100
57+
coverage run -m pytest test {posargs}
58+
coverage report
5759

5860

0 commit comments

Comments
 (0)