Skip to content

Commit 942a3cc

Browse files
committed
Migrate from tox.ini to tox.toml
1 parent 5275d26 commit 942a3cc

3 files changed

Lines changed: 46 additions & 47 deletions

File tree

‎.github/workflows/ci.yml‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,14 +76,14 @@ 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
82-
run: tox -e no-libs
82+
run: tox run -e no-libs
8383
if: true && !matrix.with-libs
8484
- name: Test with zstandard
8585
if: matrix.with-zstandard
86-
run: tox -e zstd
86+
run: tox run -e zstd
8787
- name: Upload coverage report
8888
uses: codecov/codecov-action@v3
8989

‎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+
3+
[env_run_base]
4+
default_base_python = "3.10"
5+
deps = [
6+
"pytest",
7+
"pytest-timeout",
8+
"coverage",
9+
]
10+
set_env = { PYTHONDEVMODE = "1", PYTHONWARNDEFAULTENCODING = "1" }
11+
commands = [
12+
["coverage", "run", "--source=xopen,tests", "-m", "pytest", "-v", "--doctest-modules", "tests"],
13+
["coverage", "report"],
14+
["coverage", "xml"],
15+
["coverage", "html"],
16+
]
17+
18+
[env.zstd]
19+
deps = [
20+
"{[env_run_base]deps}",
21+
"zstandard",
22+
]
23+
24+
[env.no-libs]
25+
deps = ["{[env_run_base]deps}", "pip"]
26+
commands = [
27+
["{env_python}", "-m", "pip", "uninstall", "-y", "isal", "zlib-ng"],
28+
{ replace = "ref", of = ["env_run_base", "commands"], extend = true },
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)