okozachenko | 093ce9e | 2021-04-01 22:47:39 +0300 | [diff] [blame] | 1 | [tox] |
ricolin | f796ea8 | 2025-03-14 23:18:14 +0800 | [diff] [blame^] | 2 | envlist = py3,py37,py38,py39,py310,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 = |
| 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 | |
| 20 | install_commands = |
| 21 | pip install {opts} {packages} |
| 22 | |
| 23 | |
ricolin | f796ea8 | 2025-03-14 23:18:14 +0800 | [diff] [blame^] | 24 | [testenv:{py3,py37,py38,py39,py310}] |
Susanta Gautam | 7bfec4f | 2021-04-16 16:22:14 +0545 | [diff] [blame] | 25 | basepython = python3 |
| 26 | deps = -r{toxinidir}/test-requirements.txt |
| 27 | commands = stestr run --slowest {posargs} |
okozachenko | 093ce9e | 2021-04-01 22:47:39 +0300 | [diff] [blame] | 28 | |
ricolin | f796ea8 | 2025-03-14 23:18:14 +0800 | [diff] [blame^] | 29 | [testenv:linters] |
| 30 | skipsdist = True |
| 31 | deps = |
| 32 | pre-commit |
| 33 | commands = |
| 34 | pre-commit run --all-files --show-diff-on-failure |
okozachenko | 093ce9e | 2021-04-01 22:47:39 +0300 | [diff] [blame] | 35 | |
| 36 | [testenv:cover] |
Susanta Gautam | 7bfec4f | 2021-04-16 16:22:14 +0545 | [diff] [blame] | 37 | basepython = python3 |
| 38 | deps = -r{toxinidir}/requirements.txt |
| 39 | -r{toxinidir}/test-requirements.txt |
okozachenko | 093ce9e | 2021-04-01 22:47:39 +0300 | [diff] [blame] | 40 | setenv = |
Susanta Gautam | 7bfec4f | 2021-04-16 16:22:14 +0545 | [diff] [blame] | 41 | {[testenv]setenv} |
| 42 | PYTHON=coverage run |
okozachenko | 093ce9e | 2021-04-01 22:47:39 +0300 | [diff] [blame] | 43 | commands = |
Susanta Gautam | 7bfec4f | 2021-04-16 16:22:14 +0545 | [diff] [blame] | 44 | coverage erase |
| 45 | stestr run --slowest {posargs} |
okozachenko | 093ce9e | 2021-04-01 22:47:39 +0300 | [diff] [blame] | 46 | coverage combine |
| 47 | coverage html -d cover |
| 48 | coverage xml -o cover/coverage.xml |
Susanta Gautam | 7bfec4f | 2021-04-16 16:22:14 +0545 | [diff] [blame] | 49 | coverage report |
okozachenko | 093ce9e | 2021-04-01 22:47:39 +0300 | [diff] [blame] | 50 | |
okozachenko | 093ce9e | 2021-04-01 22:47:39 +0300 | [diff] [blame] | 51 | |
Susanta Gautam | 7bfec4f | 2021-04-16 16:22:14 +0545 | [diff] [blame] | 52 | [testenv:venv] |
| 53 | commands = {posargs} |