okozachenko | 093ce9e | 2021-04-01 22:47:39 +0300 | [diff] [blame] | 1 | [tox] |
ricolin | aca56c7 | 2024-11-13 14:36:13 +0800 | [diff] [blame] | 2 | envlist = py3,linters |
okozachenko | 093ce9e | 2021-04-01 22:47:39 +0300 | [diff] [blame] | 3 | skipsdist = True |
Susanta Gautam | 7bfec4f | 2021-04-16 16:22:14 +0545 | [diff] [blame] | 4 | sitepackages = False |
5 | skip_missing_interpreters = True | ||||
okozachenko | 093ce9e | 2021-04-01 22:47:39 +0300 | [diff] [blame] | 6 | |
7 | [testenv] | ||||
okozachenko | 093ce9e | 2021-04-01 22:47:39 +0300 | [diff] [blame] | 8 | setenv = |
Susanta Gautam | 7bfec4f | 2021-04-16 16:22:14 +0545 | [diff] [blame] | 9 | VIRTUAL_ENV={envdir} |
okozachenko | 093ce9e | 2021-04-01 22:47:39 +0300 | [diff] [blame] | 10 | PYTHONWARNINGS=default::DeprecationWarning |
Susanta Gautam | 7bfec4f | 2021-04-16 16:22:14 +0545 | [diff] [blame] | 11 | PYTHONHASHSEED=0 |
12 | TERM=linux | ||||
okozachenko | 093ce9e | 2021-04-01 22:47:39 +0300 | [diff] [blame] | 13 | |
Susanta Gautam | 7bfec4f | 2021-04-16 16:22:14 +0545 | [diff] [blame] | 14 | deps = |
Susanta Gautam | 7bfec4f | 2021-04-16 16:22:14 +0545 | [diff] [blame] | 15 | -r{toxinidir}/test-requirements.txt |
16 | -r{toxinidir}/requirements.txt | ||||
17 | -c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master} | ||||
18 | |||||
19 | install_commands = | ||||
20 | pip install {opts} {packages} | ||||
21 | |||||
22 | |||||
ricolin | aca56c7 | 2024-11-13 14:36:13 +0800 | [diff] [blame] | 23 | [testenv:{py3,py38,py39,py310}] |
Susanta Gautam | 7bfec4f | 2021-04-16 16:22:14 +0545 | [diff] [blame] | 24 | basepython = python3 |
ricolin | e4c69c9 | 2024-10-25 16:30:37 +0800 | [diff] [blame] | 25 | deps = -r{toxinidir}/requirements.txt |
26 | -r{toxinidir}/test-requirements.txt | ||||
Susanta Gautam | 7bfec4f | 2021-04-16 16:22:14 +0545 | [diff] [blame] | 27 | commands = stestr run --slowest {posargs} |
okozachenko | 093ce9e | 2021-04-01 22:47:39 +0300 | [diff] [blame] | 28 | |
okozachenko | 093ce9e | 2021-04-01 22:47:39 +0300 | [diff] [blame] | 29 | [testenv:cover] |
Susanta Gautam | 7bfec4f | 2021-04-16 16:22:14 +0545 | [diff] [blame] | 30 | basepython = python3 |
31 | deps = -r{toxinidir}/requirements.txt | ||||
32 | -r{toxinidir}/test-requirements.txt | ||||
okozachenko | 093ce9e | 2021-04-01 22:47:39 +0300 | [diff] [blame] | 33 | setenv = |
Susanta Gautam | 7bfec4f | 2021-04-16 16:22:14 +0545 | [diff] [blame] | 34 | {[testenv]setenv} |
35 | PYTHON=coverage run | ||||
okozachenko | 093ce9e | 2021-04-01 22:47:39 +0300 | [diff] [blame] | 36 | commands = |
Susanta Gautam | 7bfec4f | 2021-04-16 16:22:14 +0545 | [diff] [blame] | 37 | coverage erase |
38 | stestr run --slowest {posargs} | ||||
okozachenko | 093ce9e | 2021-04-01 22:47:39 +0300 | [diff] [blame] | 39 | coverage combine |
40 | coverage html -d cover | ||||
41 | coverage xml -o cover/coverage.xml | ||||
Susanta Gautam | 7bfec4f | 2021-04-16 16:22:14 +0545 | [diff] [blame] | 42 | coverage report |
okozachenko | 093ce9e | 2021-04-01 22:47:39 +0300 | [diff] [blame] | 43 | |
ricolin | aca56c7 | 2024-11-13 14:36:13 +0800 | [diff] [blame] | 44 | [testenv:linters] |
45 | skipsdist = True | ||||
46 | deps = | ||||
47 | pre-commit | ||||
48 | commands = | ||||
49 | pre-commit run --all-files --show-diff-on-failure | ||||
okozachenko | 093ce9e | 2021-04-01 22:47:39 +0300 | [diff] [blame] | 50 | |
Susanta Gautam | 7bfec4f | 2021-04-16 16:22:14 +0545 | [diff] [blame] | 51 | [testenv:venv] |
52 | commands = {posargs} |