-
Notifications
You must be signed in to change notification settings - Fork 7
/
tox.ini
66 lines (58 loc) · 1.7 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
[tox]
env_list = py{3.11,3.12,3.13},format,lint,typecheck
skip_missing_interpreters = False
isolated_build = True
labels =
test = py3.12
test_oldest = py3.11
test_latest = py3.13
test_all = py{3.11,3.12,3.13}
static = lint,typecheck
[testenv]
# Multi-env performance tweak based on https://hynek.me/articles/turbo-charge-tox/
package = wheel
wheel_build_env = .pkg
groups = dev
allowlist_externals = pytest
passenv =
CI
VENVSTACKS_*
commands =
pytest {posargs:-m "not slow"} tests/
[testenv:coverage]
# Subprocess coverage based on https://hynek.me/articles/turbo-charge-tox/
allowlist_externals = coverage
set_env = COVERAGE_PROCESS_START={toxinidir}/pyproject.toml
commands_pre = python -c 'import pathlib; pathlib.Path("{env_site_packages_dir}/cov.pth").write_text("import coverage; coverage.process_startup()")'
commands =
coverage run --parallel -m pytest {posargs} tests/
[testenv:format]
allowlist_externals = ruff
commands =
ruff format {posargs} src/ tests/ misc/
[testenv:lint]
allowlist_externals = ruff
commands =
ruff check --exclude 'tests/sample_project' {posargs} src/ tests/ misc/
[testenv:typecheck]
allowlist_externals = mypy
commands =
mypy --strict --exclude 'tests/sample_project' {posargs} src/ tests/ misc/
[testenv:docs]
groups =
deps = -r docs/requirements.txt
allowlist_externals = sphinx-build
commands =
sphinx-build -W -b dirhtml {posargs} docs/ docs/_build
[testenv:linkcheck]
groups =
deps = -r docs/requirements.txt
allowlist_externals = sphinx-build
commands =
sphinx-build -W -b linkcheck {posargs} docs/ docs/_build
[gh]
python =
3.11 = py3.11
3.12 = py3.12
# Collect coverage stats on the newest version
3.13 = coverage