Skip to content

Commit 537d226

Browse files
authored
Remove tox configuration and use uv in Github Actions (#134)
* Remove tox configuration and use uv in Github Actions * Move psutil job to 3.14t
1 parent 506f53b commit 537d226

File tree

3 files changed

+137
-120
lines changed

3 files changed

+137
-120
lines changed

.github/workflows/main.yml

Lines changed: 30 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -11,29 +11,43 @@ on:
1111
jobs:
1212
test:
1313
runs-on: ubuntu-latest
14-
name: Run tests with ${{ matrix.python-version[0] }}
14+
name: Run tests with ${{ matrix.python-version }}${{ matrix.with-psutil && ' (and psutil)' || '' }}
1515
strategy:
1616
fail-fast: false
1717
matrix:
18-
python-version:
19-
- ['3.9', '3.9']
20-
- ['3.10', '3.10']
21-
- ['3.11', '3.11']
22-
- ['3.12', '3.12']
23-
- ['3.13', '3.13']
24-
- ['3.13t', '3.13t']
25-
- ['3.14-dev', '3.14']
26-
- ['3.14t-dev', '3.14t']
27-
- ['pypy-3.9', 'pypy3.9']
18+
python-version: ['3.9', '3.10', '3.11', '3.12', '3.13', '3.13t', '3.14', '3.14t']
19+
with-psutil: [false]
20+
include:
21+
- python-version: '3.14t'
22+
with-psutil: true
2823
steps:
2924
- uses: actions/checkout@v4
3025
- uses: actions/setup-python@v5
3126
with:
32-
python-version: ${{ matrix.python-version[0] }}
27+
python-version: ${{ matrix.python-version }}
3328

34-
- name: Install tox
29+
- name: Setup uv
30+
uses: astral-sh/setup-uv@v6
31+
with:
32+
activate-environment: true
33+
34+
- name: Install dependencies
3535
run: |
36-
pip install tox
36+
uv sync --locked --group test
3737
38-
- name: Run test suite (${{ matrix.python-version[0] }})
39-
run: tox -e ${{ matrix.python-version[1] }}
38+
- name: Install psutil (if needed)
39+
if: matrix.with-psutil
40+
run: |
41+
uv pip install psutil
42+
43+
- name: Run tests with coverage
44+
run: |
45+
coverage run --source=pytest_run_parallel,tests -m pytest -W error -v
46+
47+
- name: Show coverage results
48+
run: |
49+
coverage report -m
50+
51+
- name: Check manifest
52+
run: |
53+
check-manifest -u -v

pyproject.toml

Lines changed: 8 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ classifiers = [
3333
"Programming Language :: Python :: 3.11",
3434
"Programming Language :: Python :: 3.12",
3535
"Programming Language :: Python :: 3.13",
36+
"Programming Language :: Python :: 3.14",
3637
"Programming Language :: Python :: 3 :: Only",
3738
"Programming Language :: Python :: Implementation :: CPython",
3839
"Programming Language :: Python :: Implementation :: PyPy",
@@ -50,71 +51,20 @@ psutil = [
5051
]
5152

5253
[dependency-groups]
54+
test = [
55+
"coverage[toml]>=7.5",
56+
"pytest-order",
57+
"hypothesis>=6.135.33",
58+
"check-manifest",
59+
]
5360
dev = [
61+
{ include-group = "test" },
5462
"pre-commit>=3.5.0",
55-
"coverage[toml]>=7.5",
56-
"pytest-order>=1.3.0",
5763
"ruff>=0.7.2",
58-
"tox>=4.23.2",
5964
]
6065

6166
[tool.ruff]
6267
exclude = ["docs/conf.py"]
6368

6469
[tool.ruff.lint]
6570
select = ["E4", "E7", "E9", "F", "I"]
66-
67-
[tool.tox]
68-
env_list = ["py39", "py310", "py311", "py312", "py313", "py313t", "psutil", "pypy3", "ruff"]
69-
70-
[tool.tox.env_run_base]
71-
deps = [
72-
"pytest>=6.2.0",
73-
"coverage[toml]>=7.5",
74-
"pytest-order",
75-
"check-manifest",
76-
"hypothesis>=6.135.33",
77-
]
78-
commands = [
79-
[
80-
"coverage",
81-
"run",
82-
"--source=pytest_run_parallel,tests",
83-
"-m",
84-
"pytest",
85-
"-W",
86-
"error",
87-
"-v",
88-
"{posargs:tests}"
89-
],
90-
[
91-
"coverage",
92-
"report",
93-
"-m"
94-
],
95-
[
96-
"check-manifest",
97-
"-u",
98-
"-v",
99-
]
100-
]
101-
102-
[tool.tox.env.ruff]
103-
skip_install = true
104-
deps = ["ruff"]
105-
commands = [["ruff", "check"]]
106-
107-
[tool.tox.env.psutil]
108-
basepython = ["python3.13"]
109-
description = "run tests with psutil installed"
110-
extras = ["psutil"]
111-
112-
113-
[tool.tox.gh.python]
114-
"3.9" = ["py39"]
115-
"3.10" = ["py310"]
116-
"3.11" = ["py311"]
117-
"3.12" = ["py312"]
118-
"3.13" = ["py313", "psutil"]
119-
"3.13t" = ["py313t"]
120-
"pypy-3.9" = ["pypy3"]

uv.lock

Lines changed: 99 additions & 46 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)