-
-
Notifications
You must be signed in to change notification settings - Fork 37
/
tox.ini
77 lines (61 loc) · 1.66 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
76
77
[tox]
min_version = 4
env_list =
pre-commit,
mypy-{pkg,api},
py3{8,9,10,11,12,13}{,-twisted},
docs,
coverage-report
[testenv]
package = wheel
wheel_build_env = .pkg
pass_env =
NO_COLOR
FORCE_COLOR
extras = tests
deps = twisted: twisted[tls]
commands = coverage run -m pytest {posargs}
[testenv:pre-commit]
description = Run all pre-commit hooks.
skip_install = true
deps = pre-commit
commands = pre-commit run --all-files
[testenv:mypy-api]
description = Type-check our public API.
extras = types
commands = mypy tests/typing
[testenv:mypy-pkg]
description = Type-check the package.
extras = types
commands = mypy src
[testenv:docs]
description = Build docs and run doctests.
# Keep base_python in sync with .readthedocs.yaml & ci.yml/docs
base_python = py312
extras = docs
commands =
sphinx-build -W -n -a --jobs auto -b html -d {envtmpdir}/doctrees docs docs/_build/html
sphinx-build -W -b doctest -d {envtmpdir}/doctrees docs docs/_build/html
[testenv:docs-serve]
package = editable
base_python = {[testenv:docs]base_python}
extras = {[testenv:docs]extras}
deps = watchfiles
commands =
watchfiles \
--ignore-paths docs/_build/ \
'sphinx-build -W -n --jobs auto -b html -d {envtmpdir}/doctrees docs docs/_build/html' \
src \
docs
[testenv:docs-linkcheck]
package = editable
base_python = {[testenv:docs]base_python}
extras = {[testenv:docs]extras}
commands = sphinx-build -W -b linkcheck -d {envtmpdir}/doctrees docs docs/_build/html
[testenv:coverage-report]
description = Report coverage over all test runs.
deps = coverage[toml]>=5.0.2
skip_install = true
commands =
coverage combine
coverage report