-
Notifications
You must be signed in to change notification settings - Fork 114
/
tox.ini
66 lines (59 loc) · 1.56 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
# Tox (http://tox.testrun.org/) is a tool for running tests
# in multiple virtualenvs. This configuration file will run the
# test suite on all supported python versions. To use it, "pip install tox"
# and then run "tox" from this directory.
[tox]
envlist =
py27,
py34,
py35,
py36,
lint,
docs
[travis]
python =
2.7: py27, lint, bandit, flake8
3.4: py34
3.5: py35
3.6: py36
[testenv]
install_command = pip install {opts} {packages}
deps =
-rrequirements.txt
setenv =
COVERAGE_FILE = test-reports/{envname}/.coverage
PYTEST_ADDOPTS = --junitxml=test-reports/{envname}/junit.xml -vv
commands =
coverage run --source stethoscope --parallel-mode -m pytest {posargs}
coverage combine
coverage report -m
coverage html -d test-reports/{envname}/coverage-html
coverage xml -o test-reports/{envname}/coverage.xml
[testenv:lint]
skip_install = true
ignore_errors = true
deps =
{[testenv:flake8]deps}
{[testenv:bandit]deps}
commands =
{[testenv:flake8]commands}
{[testenv:bandit]commands}
[testenv:bandit]
skip_install = true
deps = bandit
commands = bandit -r instance config stethoscope
[testenv:flake8]
skip_install = true
deps =
flake8
flake8-import-order>=0.9
commands = flake8 --config=./setup.cfg instance config stethoscope tests setup.py
[testenv:docs]
passenv = SKIP_LINKCHECK
deps =
sphinx
whitelist_externals = bash
commands =
sphinx-build {posargs:-E} -b html docs docs/_build/html
sphinx-build {posargs:-E} -b doctest docs docs/_build/html
bash -c 'test -n "{env:SKIP_LINKCHECK:}" || sphinx-build -b linkcheck docs docs/_build/html'