blob: 25427880026efd8c0db5f847d6fee90bbade6778 [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
ricoline4c69c92024-10-25 16:30:37 +080025deps = -r{toxinidir}/requirements.txt
26 -r{toxinidir}/test-requirements.txt
Susanta Gautam7bfec4f2021-04-16 16:22:14 +054527commands = stestr run --slowest {posargs}
okozachenko093ce9e2021-04-01 22:47:39 +030028
okozachenko093ce9e2021-04-01 22:47:39 +030029[testenv:cover]
Susanta Gautam7bfec4f2021-04-16 16:22:14 +054530basepython = python3
31deps = -r{toxinidir}/requirements.txt
32 -r{toxinidir}/test-requirements.txt
okozachenko093ce9e2021-04-01 22:47:39 +030033setenv =
Susanta Gautam7bfec4f2021-04-16 16:22:14 +054534 {[testenv]setenv}
35 PYTHON=coverage run
okozachenko093ce9e2021-04-01 22:47:39 +030036commands =
Susanta Gautam7bfec4f2021-04-16 16:22:14 +054537 coverage erase
38 stestr run --slowest {posargs}
okozachenko093ce9e2021-04-01 22:47:39 +030039 coverage combine
40 coverage html -d cover
41 coverage xml -o cover/coverage.xml
Susanta Gautam7bfec4f2021-04-16 16:22:14 +054542 coverage report
okozachenko093ce9e2021-04-01 22:47:39 +030043
ricolinaca56c72024-11-13 14:36:13 +080044[testenv:linters]
45skipsdist = True
46deps =
47 pre-commit
48commands =
49 pre-commit run --all-files --show-diff-on-failure
okozachenko093ce9e2021-04-01 22:47:39 +030050
Susanta Gautam7bfec4f2021-04-16 16:22:14 +054551[testenv:venv]
52commands = {posargs}