Skip to content

Commit 078dd67

Browse files
committed
Migrate from tox.ini to tox.toml
1 parent 5275d26 commit 078dd67

3 files changed

Lines changed: 44 additions & 45 deletions

File tree

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ jobs:
7676
- name: Install dependencies
7777
run: python -m pip install tox
7878
- name: Test
79-
run: tox -e py
79+
run: tox run -e ${{ matrix.python-version }}
8080
if: matrix.with-libs
8181
- name: Test without python-isal and python-zlib-ng
8282
run: tox -e no-libs

tox.ini

Lines changed: 0 additions & 44 deletions
This file was deleted.

tox.toml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
env_list = ["black", "ruff", "mypy", "3.9", "3.10", "3.11", "3.12", "3.13"]
2+
isolated_build = true
3+
4+
[env_run_base]
5+
default_base_python = "3.10"
6+
deps = [
7+
"pytest",
8+
"pytest-timeout",
9+
"coverage",
10+
]
11+
set_env = { PYTHONDEVMODE = "1", PYTHONWARNDEFAULTENCODING = "1" }
12+
commands = [
13+
["coverage", "run", "--source=xopen,tests", "-m", "pytest", "-v", "--doctest-modules", "tests"],
14+
["coverage", "report"],
15+
["coverage", "xml"],
16+
["coverage", "html"],
17+
]
18+
19+
[env.zstd]
20+
deps = [
21+
"{[base]deps}",
22+
"zstandard",
23+
]
24+
25+
[env.no-libs]
26+
commands = [
27+
["python", "-m", "pip", "uninstall", "-y", "isal", "zlib-ng"],
28+
["{[base]commands}"],
29+
]
30+
31+
[env.black]
32+
deps = ["black==22.3.0"]
33+
skip_install = true
34+
commands = [["black", "--check", "src/", "tests/"]]
35+
36+
[env.ruff]
37+
deps = ["ruff"]
38+
commands = [["ruff", "check", "src/", "tests/"]]
39+
skip_install = true
40+
41+
[env.mypy]
42+
deps = ["mypy"]
43+
commands = [["mypy", "src/"]]

0 commit comments

Comments
 (0)