-
-
Notifications
You must be signed in to change notification settings - Fork 36
Expand file tree
/
Copy pathtox.ini
More file actions
76 lines (63 loc) · 1.86 KB
/
tox.ini
File metadata and controls
76 lines (63 loc) · 1.86 KB
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
[tox]
min_version = 4
env_list =
lint,
mypy-{api,pkg},
docs-{build,doctests},
py3{8-14}{,-pyopenssl}{,-oldest}{,-idna},
coverage-report
[testenv]
package = wheel
wheel_build_env = .pkg
extras =
tests
idna: idna
deps =
pyopenssl: pyopenssl
pass_env =
FORCE_COLOR
NO_COLOR
set_env =
oldest: PIP_CONSTRAINT = tests/constraints/oldest-cryptography.txt
pyopenssl-oldest: PIP_CONSTRAINT = tests/constraints/oldest-pyopenssl.txt
commands =
coverage run -m pytest {posargs}
py312-pyopenssl-latest-idna: coverage run -m pytest --doctest-modules --doctest-glob='*.rst' {posargs}
[testenv:coverage-report]
# keep in-sync with .python-version-default
base_python = py313
deps = coverage
skip_install = true
commands =
coverage combine
coverage report
[testenv:lint]
skip_install = true
deps = prek
commands = prek run --all-files {posargs}
[testenv:mypy-api]
extras = mypy
commands = mypy tests/typing docs/pyopenssl_example.py
[testenv:mypy-pkg]
extras = mypy
commands = mypy src
[testenv:docs-{build,doctests,linkcheck}]
# Keep base_python in sync with gh-actions and .readthedocs.yaml.
base_python = py313
extras = docs
commands =
# N.B. doctests is not a nitpicky as build -- we need to run both in CI!
build: sphinx-build -n -T -W -b html -d {envtmpdir}/doctrees docs {posargs:docs/_build/}html
doctests: sphinx-build -n -T -W -b doctest -d {envtmpdir}/doctrees docs {posargs:docs/_build/}html
linkcheck: sphinx-build -W -b linkcheck -d {envtmpdir}/doctrees docs docs/_build/html
[testenv:docs-watch]
package = editable
base_python = {[testenv:docs-build]base_python}
extras = {[testenv:docs-build]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