forked from python/mypy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
tox.ini
72 lines (65 loc) · 2.12 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
[tox]
minversion = 3.8.0
skip_missing_interpreters = true
envlist =
py35,
py36,
py37,
lint,
type,
docs,
isolated_build = true
[testenv]
description = run the test driver with {basepython}
setenv = cov: COVERAGE_FILE={toxworkdir}/.coverage.{envname}
passenv = PYTEST_XDIST_WORKER_COUNT PROGRAMDATA PROGRAMFILES(X86)
deps = -rtest-requirements.txt
commands = python -m pytest {posargs}
cov: python -m pytest {posargs: --cov mypy --cov-config setup.cfg}
[testenv:coverage]
description = [run locally after tests]: combine coverage data and create report
deps =
coverage >= 4.5.1, < 5
diff_cover >= 1.0.5, <2
skip_install = True
passenv =
{[testenv]passenv}
DIFF_AGAINST
setenv = COVERAGE_FILE={toxworkdir}/.coverage
commands =
coverage combine --rcfile setup.cfg
coverage report -m --rcfile setup.cfg
coverage xml -o {toxworkdir}/coverage.xml --rcfile setup.cfg
coverage html -d {toxworkdir}/htmlcov --rcfile setup.cfg
diff-cover --compare-branch {env:DIFF_AGAINST:origin/master} {toxworkdir}/coverage.xml
depends =
py35,
py36,
py37,
parallel_show_output = True
[testenv:lint]
description = check the code style
basepython = python3.7
commands = flake8 {posargs}
[testenv:type]
description = type check ourselves
basepython = python3.7
commands =
python -m mypy --config-file mypy_self_check.ini -p mypy -p mypyc
python -m mypy --config-file mypy_self_check.ini misc/proper_plugin.py scripts/mypyc
[testenv:docs]
description = invoke sphinx-build to build the HTML docs
basepython = python3.7
deps = -rdocs/requirements-docs.txt
commands =
sphinx-build -d "{toxworkdir}/docs_doctree" docs/source "{toxworkdir}/docs_out" --color -W -bhtml {posargs}
python -c 'import pathlib; print("documentation available under file://\{0\}".format(pathlib.Path(r"{toxworkdir}") / "docs_out" / "index.html"))'
[testenv:dev]
description = generate a DEV environment, that has all project libraries
usedevelop = True
deps =
-rtest-requirements.txt
-rdocs/requirements-docs.txt
commands =
python -m pip list --format=columns
python -c 'import sys; print(sys.executable)'