-
Notifications
You must be signed in to change notification settings - Fork 32
/
tox.ini
75 lines (68 loc) · 2.44 KB
/
tox.ini
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
# For more information about tox, see https://tox.readthedocs.io/en/latest/
[tox]
minversion = 4.4
isolated_build = true
envlist =
py38-pytest{7.0, 7.x, 8.0, 8.x}-mypy{1.0, 1.x}-xdist{1.x, 2.0, 2.x, 3.0, 3.x}
py39-pytest{7.0, 7.x, 8.0, 8.x}-mypy{1.0, 1.x}-xdist{1.x, 2.0, 2.x, 3.0, 3.x}
py310-pytest{7.0, 7.x, 8.0, 8.x}-mypy{1.0, 1.x}-xdist{1.x, 2.0, 2.x, 3.0, 3.x}
py311-pytest{7.0, 7.x, 8.0, 8.x}-mypy{1.0, 1.x}-xdist{1.x, 2.0, 2.x, 3.0, 3.x}
py312-pytest{7.0, 7.x, 8.0, 8.x}-mypy{1.0, 1.x}-xdist{1.x, 2.0, 2.x, 3.0, 3.x}
py313-pytest{7.0, 7.x, 8.0, 8.x}-mypy{1.0, 1.x}-xdist{1.x, 2.0, 2.x, 3.0, 3.x}
static
publish
[gh-actions]
python =
3.8: py38-pytest{7.0, 7.x, 8.0, 8.x}-mypy{1.0, 1.x}-xdist{1.x, 2.0, 2.x, 3.0, 3.x}
3.9: py39-pytest{7.0, 7.x, 8.0, 8.x}-mypy{1.0, 1.x}-xdist{1.x, 2.0, 2.x, 3.0, 3.x}
3.10: py310-pytest{7.0, 7.x, 8.0, 8.x}-mypy{1.0, 1.x}-xdist{1.x, 2.0, 2.x, 3.0, 3.x}
3.11: py311-pytest{7.0, 7.x, 8.0, 8.x}-mypy{1.0, 1.x}-xdist{1.x, 2.0, 2.x, 3.0, 3.x}
3.12: py312-pytest{7.0, 7.x, 8.0, 8.x}-mypy{1.0, 1.x}-xdist{1.x, 2.0, 2.x, 3.0, 3.x}, static, publish
3.13: py313-pytest{7.0, 7.x, 8.0, 8.x}-mypy{1.0, 1.x}-xdist{1.x, 2.0, 2.x, 3.0, 3.x}
[testenv]
constrain_package_deps = true
deps =
pytest7.0: pytest ~= 7.0.0
pytest7.x: pytest ~= 7.0
pytest8.0: pytest ~= 8.0.0
pytest8.x: pytest ~= 8.0
mypy1.0: mypy ~= 1.0.0
mypy1.x: mypy ~= 1.0
xdist1.x: pytest-xdist ~= 1.0
xdist2.0: pytest-xdist ~= 2.0.0
xdist2.x: pytest-xdist ~= 2.0
xdist3.0: pytest-xdist ~= 3.0.0
xdist3.x: pytest-xdist ~= 3.0
packaging ~= 21.3
pytest-cov ~= 4.1.0
pytest-randomly ~= 3.4
setenv =
COVERAGE_FILE = .coverage.{envname}
commands = pytest -p no:mypy {posargs:--cov pytest_mypy --cov-branch --cov-fail-under 100 --cov-report term-missing -n auto}
[pytest]
testpaths = tests
[testenv:publish]
passenv = TWINE_*
constrain_package_deps = false
deps =
build[virtualenv] ~= 1.0.0
twine ~= 5.0.0
commands =
{envpython} -m build --outdir {envtmpdir} .
twine {posargs:check} {envtmpdir}/*
[testenv:static]
basepython = py312 # pytest.Node.from_parent uses typing.Self
deps =
bandit ~= 1.7.0
black ~= 24.2.0
flake8 ~= 7.0.0
mypy ~= 1.11.0
pytest-xdist >= 3.6.0 # needed for type-checking
commands =
black --check src tests
flake8 src tests
mypy --strict src
bandit --recursive src
[flake8]
max-line-length = 88
extend-ignore = E203