-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathtox.ini
77 lines (68 loc) · 2.28 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]
envlist = py35,
py36,
coverage,
fix-lint,
docs
minversion = 2.9.0
skip_missing_interpreters = true
[testenv]
description = run the tests with pytest under {basepython}
setenv = PIP_DISABLE_VERSION_CHECK = 1
COVERAGE_FILE = {toxworkdir}/.coverage.{envname}
passenv = http_proxy https_proxy no_proxy SSL_CERT_FILE TOXENV CI TRAVIS TRAVIS_* APPVEYOR APPVEYOR_* CODECOV_*
deps = pandas
pytest
pytest-cov
cerberus
requests
extras = testing
changedir = {toxinidir}/tests
commands = pytest {posargs:--cov="pydst" --cov-config="{toxinidir}/tox.ini"}
[testenv:docs]
description = invoke sphinx-build to build the HTML docs and check that all links are valid
whitelist_externals = sphinx-build
basepython = python3.6
extras = docs
deps = sphinx
pandas
pytest
pytest-cov
cerberus
requests
changedir = {toxinidir}
commands = sphinx-build -d "{toxworkdir}/docs" docs "{toxworkdir}/docs" --color -W -bhtml
[testenv:coverage]
description = [run locally after tests]: combine coverage data and create report;
generates a diff coverage against origin/master (can be changed by setting DIFF_AGAINST env var)
deps = {[testenv]deps}
coverage >= 4.4.1, < 5
diff_cover
skip_install = True
passenv = {[testenv]passenv}
DIFF_AGAINST
setenv = COVERAGE_FILE={toxworkdir}/.coverage
changedir = {toxinidir}
commands = coverage erase
coverage combine
coverage report -m
coverage xml -o {toxworkdir}/coverage.xml
coverage html
diff-cover --compare-branch {env:DIFF_AGAINST:origin/master} {toxworkdir}/coverage.xml
[testenv:codecov]
description = [only run on CI]: upload coverage data to codecov (depends on coverage running first)
deps = codecov
skip_install = True
changedir = {toxinidir}
commands = codecov --file "{toxworkdir}/coverage.xml"
[testenv:exit_code]
# to see how the InvocationError is displayed, use
# PYTHONPATH=.:$PYTHONPATH python3 -m tox -e exit_code
basepython = python3.6
description = commands with several exit codes
skip_install = True
changedir = {toxinidir}
commands = python3.6 -c "import sys; sys.exit(139)"
[testenv:X]
description = print the positional arguments passed in with echo
commands = echo {posargs}