01622845863b71fedd0b17f68ed8dd5e12652dbc
[yardstick.git] / tox.ini
1 [tox]
2 minversion = 2.0
3 skipsdist = True
4 envlist = py{27,3},pep8,functional{,-py3},coverage
5
6 [testenv]
7 usedevelop=True
8 passenv = http_proxy HTTP_PROXY https_proxy HTTPS_PROXY no_proxy NO_PROXY BRANCH
9 setenv =
10    VIRTUAL_ENV={envdir}
11 deps =
12     -r{toxinidir}/requirements.txt
13     -r{toxinidir}/test-requirements.txt
14 whitelist_externals = /bin/bash
15
16 [testenv:py27]
17 commands =
18   /bin/bash {toxinidir}/tools/run_tests.sh --unit
19
20 [testenv:py3]
21 basepython = python3
22 commands = {[testenv:py27]commands}
23
24 [testenv:pep8]
25 # for gate testing, scans only the files changed in the last commit
26 commands =
27   /bin/bash tools/coding-checks.sh --pylint HEAD~ '{posargs}'
28
29 [testenv:pep8-full]
30 # For manual testing, scans the whole codebase
31 commands =
32   /bin/bash tools/coding-checks.sh --pylint '{posargs}'
33
34 [testenv:coverage]
35 basepython = python3
36 commands =
37   /bin/bash {toxinidir}/tools/run_tests.sh --coverage
38
39 [testenv:functional]
40 commands =
41   /bin/bash {toxinidir}/tools/run_tests.sh --functional
42
43 [testenv:functional-py3]
44 basepython = python3
45 commands = {[testenv:functional]commands}
46
47 [testenv:docs]
48 deps = -rdocs/requirements.txt
49 commands =
50     sphinx-build -b html -n -d {envtmpdir}/doctrees ./docs/ {toxinidir}/docs/_build/html
51     echo "Generated docs available in {toxinidir}/docs/_build/html"
52 whitelist_externals = echo
53
54 [testenv:docs-linkcheck]
55 deps = -rdocs/requirements.txt
56 commands = sphinx-build -b linkcheck -d {envtmpdir}/doctrees ./docs/ {toxinidir}/docs/_build/linkcheck
57
58 [testenv:os-requirements]
59 commands =
60     python {toxinidir}/tools/os-requirements-check.py {envdir}