blob: 7bf9cf3b83c6393c45b66c2303a0c9ad5303b8cc [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 =
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
ricolinaca56c72024-11-13 14:36:13 +080024[testenv:{py3,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
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}
okozachenko093ce9e2021-04-01 22:47:39 +030053
54[flake8]
55# E123, E125 skipped as they are invalid PEP-8.
56
57show-source = True
58ignore = E123,E125
59builtins = _
60exclude=.venv,.git,.tox,dist,doc,*lib/python*,*egg,build