blob: 9676ac4c9a648f984712d1de7e6c3b9514c7ac5e [file] [log] [blame]
okozachenko093ce9e2021-04-01 22:47:39 +03001[tox]
Susanta Gautam7bfec4f2021-04-16 16:22:14 +05452envlist = py3,pep8
okozachenko093ce9e2021-04-01 22:47:39 +03003skipsdist = True
Susanta Gautam7bfec4f2021-04-16 16:22:14 +05454sitepackages = False
5skip_missing_interpreters = True
okozachenko093ce9e2021-04-01 22:47:39 +03006
7[testenv]
okozachenko093ce9e2021-04-01 22:47:39 +03008setenv =
Susanta Gautam7bfec4f2021-04-16 16:22:14 +05459 VIRTUAL_ENV={envdir}
okozachenko093ce9e2021-04-01 22:47:39 +030010 PYTHONWARNINGS=default::DeprecationWarning
Susanta Gautam7bfec4f2021-04-16 16:22:14 +054511 PYTHONHASHSEED=0
12 TERM=linux
okozachenko093ce9e2021-04-01 22:47:39 +030013
Susanta Gautam7bfec4f2021-04-16 16:22:14 +054514deps =
15 flake8
16 -r{toxinidir}/test-requirements.txt
17 -r{toxinidir}/requirements.txt
18 -c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
19
20install_commands =
21 pip install {opts} {packages}
22
23
24[testenv:py3]
25basepython = python3
26deps = -r{toxinidir}/test-requirements.txt
27commands = stestr run --slowest {posargs}
okozachenko093ce9e2021-04-01 22:47:39 +030028
29[testenv:pep8]
Susanta Gautam7bfec4f2021-04-16 16:22:14 +054530commands =
31 flake8
okozachenko093ce9e2021-04-01 22:47:39 +030032
33[testenv:cover]
Susanta Gautam7bfec4f2021-04-16 16:22:14 +054534basepython = python3
35deps = -r{toxinidir}/requirements.txt
36 -r{toxinidir}/test-requirements.txt
okozachenko093ce9e2021-04-01 22:47:39 +030037setenv =
Susanta Gautam7bfec4f2021-04-16 16:22:14 +054538 {[testenv]setenv}
39 PYTHON=coverage run
okozachenko093ce9e2021-04-01 22:47:39 +030040commands =
Susanta Gautam7bfec4f2021-04-16 16:22:14 +054541 coverage erase
42 stestr run --slowest {posargs}
okozachenko093ce9e2021-04-01 22:47:39 +030043 coverage combine
44 coverage html -d cover
45 coverage xml -o cover/coverage.xml
Susanta Gautam7bfec4f2021-04-16 16:22:14 +054546 coverage report
okozachenko093ce9e2021-04-01 22:47:39 +030047
okozachenko093ce9e2021-04-01 22:47:39 +030048
Susanta Gautam7bfec4f2021-04-16 16:22:14 +054549[testenv:venv]
50commands = {posargs}
okozachenko093ce9e2021-04-01 22:47:39 +030051
52[flake8]
53# E123, E125 skipped as they are invalid PEP-8.
54
55show-source = True
56ignore = E123,E125
57builtins = _
58exclude=.venv,.git,.tox,dist,doc,*lib/python*,*egg,build