blob: 2de6fda053d0f40d107838fe5c4f8d675f16399d [file] [log] [blame]
okozachenko093ce9e2021-04-01 22:47:39 +03001[tox]
ricolinaca56c72024-11-13 14:36:13 +08002envlist = py3,linters
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 =
Susanta Gautam7bfec4f2021-04-16 16:22:14 +054515 -r{toxinidir}/test-requirements.txt
16 -r{toxinidir}/requirements.txt
17 -c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
18
19install_commands =
20 pip install {opts} {packages}
21
22
ricolinaca56c72024-11-13 14:36:13 +080023[testenv:{py3,py38,py39,py310}]
Susanta Gautam7bfec4f2021-04-16 16:22:14 +054524basepython = python3
25deps = -r{toxinidir}/test-requirements.txt
26commands = stestr run --slowest {posargs}
okozachenko093ce9e2021-04-01 22:47:39 +030027
okozachenko093ce9e2021-04-01 22:47:39 +030028[testenv:cover]
Susanta Gautam7bfec4f2021-04-16 16:22:14 +054529basepython = python3
30deps = -r{toxinidir}/requirements.txt
31 -r{toxinidir}/test-requirements.txt
okozachenko093ce9e2021-04-01 22:47:39 +030032setenv =
Susanta Gautam7bfec4f2021-04-16 16:22:14 +054533 {[testenv]setenv}
34 PYTHON=coverage run
okozachenko093ce9e2021-04-01 22:47:39 +030035commands =
Susanta Gautam7bfec4f2021-04-16 16:22:14 +054536 coverage erase
37 stestr run --slowest {posargs}
okozachenko093ce9e2021-04-01 22:47:39 +030038 coverage combine
39 coverage html -d cover
40 coverage xml -o cover/coverage.xml
Susanta Gautam7bfec4f2021-04-16 16:22:14 +054541 coverage report
okozachenko093ce9e2021-04-01 22:47:39 +030042
ricolinaca56c72024-11-13 14:36:13 +080043[testenv:linters]
44skipsdist = True
45deps =
46 pre-commit
47commands =
48 pre-commit run --all-files --show-diff-on-failure
okozachenko093ce9e2021-04-01 22:47:39 +030049
Susanta Gautam7bfec4f2021-04-16 16:22:14 +054550[testenv:venv]
51commands = {posargs}