forked from tox-dev/tox
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtox.ini
101 lines (87 loc) · 3.04 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 = py27,
py34,
py35,
py36,
pypy,
coverage,
fix-lint,
docs
minversion = 2.9.0
skip_missing_interpreters = true
[testenv]
description = run the unit tests with pytest under {basepython}
setenv = COVERAGE_FILE={toxworkdir}/.coverage.{envname}
passenv = http_proxy https_proxy no_proxy SSL_CERT_FILE TOXENV CI TRAVIS TRAVIS_* APPVEYOR APPVEYOR_* CODECOV_*
extras = testing
commands = pytest {posargs:--cov-config="{toxinidir}/tox.ini" --cov="{envsitepackagesdir}/tox" --timeout=180 tests}
[testenv:docs]
description = invoke sphinx-build to build the HTML docs, check that URIs are valid
basepython = python3.6
extras = docs
commands = sphinx-build -d "{toxworkdir}/docs_doctree" doc "{toxworkdir}/docs_out" --color -W -bhtml
sphinx-build -d "{toxworkdir}/docs_doctree" doc "{toxworkdir}/docs_out" --color -W -blinkcheck
[testenv:fix-lint]
basepython = python3.6
passenv = {[testenv]passenv}
HOMEPATH
# without PROGRAMDATA cloning using git for Windows will fail with an
# `error setting certificate verify locations` error
PROGRAMDATA
extras = lint
description = run static analysis and style check using flake8
commands = python -m flake8 --show-source tox setup.py {posargs}
python -m flake8 --show-source doc tests {posargs}
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:coverage]
description = combine coverage data and create reports
deps = coverage
skip_install = True
changedir = {toxworkdir}
setenv = COVERAGE_FILE=.coverage
commands = coverage erase
coverage combine
coverage report --rcfile="{toxinidir}/tox.ini"
coverage xml
[testenv:codecov]
description = [only run on CI]: upload coverage data to codecov (depends on coverage running first)
deps = codecov
skip_install = True
commands = codecov --file "{toxworkdir}/coverage.xml"
[testenv:pra]
passenv = *
description = "personal release assistant" - see HOWTORELEASE.rst
extras = publish, docs
commands = "{toxinidir}/tasks/pra.sh" {posargs}
[testenv:X]
description = print the positional arguments passed in with echo
commands = echo {posargs}
[testenv:dev]
description = generate a DEV environment
extras = testing, docs
# required to make looponfail reload on every source code change
usedevelop = True
basepython = python3.6
commands = python -m pip list --format=columns
python -c 'import sys; print(sys.executable)'
[flake8]
max-complexity = 22
max-line-length = 99
[coverage:run]
omit = tox/__main__.py
[coverage:report]
skip_covered = True
show_missing = True
exclude_lines = if __name__ == ["']__main__["']:
[coverage:paths]
source = tox
{toxworkdir}/*/lib/python*/site-packages/tox
{toxworkdir}/*/Lib/site-packages/tox
{toxworkdir}/pypy*/site-packages/tox
[pytest]
addopts = -rsxX
rsyncdirs = tests tox
looponfailroots = tox tests
norecursedirs = .hg .tox
xfail_strict = True