blob: 6e73414178585b71ea4054997c6a4b608d517f83 [file] [log] [blame]
okozachenko093ce9e2021-04-01 22:47:39 +03001[tox]
ricolinf796ea82025-03-14 23:18:14 +08002envlist = py3,py37,py38,py39,py310,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 =
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
ricolinf796ea82025-03-14 23:18:14 +080024[testenv:{py3,py37,py38,py39,py310}]
Susanta Gautam7bfec4f2021-04-16 16:22:14 +054525basepython = python3
26deps = -r{toxinidir}/test-requirements.txt
27commands = stestr run --slowest {posargs}
okozachenko093ce9e2021-04-01 22:47:39 +030028
ricolinf796ea82025-03-14 23:18:14 +080029[testenv:linters]
30skipsdist = True
31deps =
32 pre-commit
33commands =
34 pre-commit run --all-files --show-diff-on-failure
okozachenko093ce9e2021-04-01 22:47:39 +030035
36[testenv:cover]
Susanta Gautam7bfec4f2021-04-16 16:22:14 +054537basepython = python3
38deps = -r{toxinidir}/requirements.txt
39 -r{toxinidir}/test-requirements.txt
okozachenko093ce9e2021-04-01 22:47:39 +030040setenv =
Susanta Gautam7bfec4f2021-04-16 16:22:14 +054541 {[testenv]setenv}
42 PYTHON=coverage run
okozachenko093ce9e2021-04-01 22:47:39 +030043commands =
Susanta Gautam7bfec4f2021-04-16 16:22:14 +054544 coverage erase
45 stestr run --slowest {posargs}
okozachenko093ce9e2021-04-01 22:47:39 +030046 coverage combine
47 coverage html -d cover
48 coverage xml -o cover/coverage.xml
Susanta Gautam7bfec4f2021-04-16 16:22:14 +054549 coverage report
okozachenko093ce9e2021-04-01 22:47:39 +030050
okozachenko093ce9e2021-04-01 22:47:39 +030051
Susanta Gautam7bfec4f2021-04-16 16:22:14 +054552[testenv:venv]
53commands = {posargs}