Files
heat-translator/tox.ini
Yasufumi Ogawa 098b9db0d4 Fix CI failures
1. Use stestr instead of deprecated running setup.py directly.

2. Stricter relationship validation in tosca-parser v2.13.0 caused
   template validation errors as similar to [1].

3. Since several depending packages are too old and failed to path
   unittests, update version of the packages.

[1] https://review.opendev.org/c/openstack/tacker/+/956458

Change-Id: I2b317f2c58518ae40b9c22dd1398a018580dc3cc
Signed-off-by: Yasufumi Ogawa <yasufum.o@gmail.com>
Co-authored-by: Shivam Shukla <shivam.shukla3@india.nec.com>
2025-09-13 07:06:58 +09:00

66 lines
1.6 KiB
INI

[tox]
envlist = py3,pep8
ignore_basepython_conflict = true
minversion = 3.2.0
[testenv]
basepython = python3
usedevelop = True
setenv =
PYTHONWARNINGS=default::DeprecationWarning
passenv =
http_proxy
HTTP_PROXY
https_proxy
HTTPS_PROXY
no_proxy
NO_PROXY
deps =
-c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
-r{toxinidir}/requirements.txt
-r{toxinidir}/test-requirements.txt
commands = stestr run --slowest '{posargs}'
[testenv:pep8]
commands = flake8
[testenv:venv]
commands = {posargs}
[testenv:cover]
setenv =
PYTHON=coverage run --source translator --parallel-mode
commands = stestr run '{posargs}'
coverage combine
coverage html -d cover
coverage xml -o cover/coverage.xml
[testenv:docs]
deps =
-c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
-r{toxinidir}/doc/requirements.txt
commands = sphinx-build -W -b html doc/source doc/build/html
[testenv:debug]
commands =
oslo_debug_helper -t translator/tests {posargs}
oslo_debug_helper -t translator/hot/tests {posargs}
oslo_debug_helper -t translator/hot/tosca/tests {posargs}
[testenv:py310-tp]
basepython = python310
allowlist_externals =
bash
commands =
bash ./run_py-tosca-parser-master.sh
python setup.py test --slowest --testr-args='{posargs}'
[flake8]
# E123, E125 skipped as they are invalid PEP-8.
show-source = True
# W504 line break after binary operator
ignore = E123,E125,W504
builtins = _
exclude=.venv,.git,.tox,dist,doc,*lib/python*,*egg,build