forked from pypa/build
-
Notifications
You must be signed in to change notification settings - Fork 0
/
tox.ini
101 lines (94 loc) · 2.54 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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
[tox]
envlist =
fix
type
docs
{py39, py38, py37, py36, pypy3}{, -path, -sdist, -wheel, -min}
isolated_build = true
skip_missing_interpreters = true
minversion = 3.14
requires =
virtualenv>=20.0.34
[testenv]
description =
run test suite with {basepython}
path: via PYTHONPATH
sdist: via source distribution
wheel: via wheel
passenv =
LC_ALL
PIP_*
PYTEST_*
setenv =
COVERAGE_FILE = {toxworkdir}/.coverage.{envname}
TEST_STATUS_DIR = {envtmpdir}
path: TEST_MODE = path
sdist: TEST_MODE = sdist
wheel: TEST_MODE = wheel
extras =
test
commands =
pytest -rsx --cov --cov-config setup.cfg \
--cov-report=html:{envdir}/htmlcov --cov-context=test \
--cov-report=xml:{toxworkdir}/coverage.{envname}.xml \
tests {posargs:-n auto}
[testenv:fix]
description = run static analysis and style checks
passenv =
HOMEPATH
PROGRAMDATA
basepython = python3.9
skip_install = true
deps =
pre-commit>=2
commands =
pre-commit run --all-files --show-diff-on-failure
python -c 'print("hint: run {envdir}/bin/pre-commit install to add checks as pre-commit hook")'
[testenv:type]
description = run type check on code base
extras = typing
commands =
mypy --show-error-codes --python-version 3.6 src/build
[testenv:{py39, py38, py37, py36, pypy3}-min]
description = check minimum versions required of all dependencies
skip_install = true
commands =
pip install .[test] -c tests/constraints.txt
pytest -rsx tests {posargs:-n auto}
[testenv:docs]
description = build documentations
basepython = python3.8
extras =
docs
commands =
sphinx-build -n docs {envtmpdir} {posargs:-W}
python -c 'print("Documentation available under file://{envtmpdir}/index.html")'
[testenv:dev]
description = generate a DEV environment
usedevelop = true
deps =
virtualenv>=20.0.34
extras =
doc
test
commands =
python -m pip list --format=columns
python -c 'import sys; print(sys.executable)'
[testenv:coverage]
description = combine coverage from test environments
passenv =
DIFF_AGAINST
setenv =
COVERAGE_FILE = {toxworkdir}/.coverage
skip_install = true
deps =
coverage>=5.1
diff_cover>=3
parallel_show_output = true
commands =
coverage combine
coverage report --skip-covered --show-missing -i
coverage xml -o {toxworkdir}/coverage.xml -i
coverage html -d {toxworkdir}/htmlcov -i
python -m diff_cover.diff_cover_tool --compare-branch {env:DIFF_AGAINST:origin/main} {toxworkdir}/coverage.xml
depends = {py39, py38, py37, py36, pypy3}{, -path, -sdist, -wheel}