Files
oslo.utils/tox.ini
caoyuan c3c5aac8ff tox: Use upper-constraints for docs jobs
Conflicts:
    tox.ini

Note(elod.illes): conflict is due to multiple python 2 removal and
tox.ini restructuring patches which are not needed to be backported to
Train. Upper constraint file link set to point to Train version of the
file.

Change-Id: I43225fc4ed3ba471ba7097f1e317bc6ffa777a46
(cherry picked from commit 8433aba4d6)
2020-04-22 19:30:40 +02:00

63 lines
1.5 KiB
INI

[tox]
minversion = 2.0
envlist = py27,py37,pep8
[testenv]
install_command = pip install {opts} {packages}
deps =
-c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/train}
-r{toxinidir}/test-requirements.txt
-r{toxinidir}/requirements.txt
commands = stestr run --slowest {posargs}
[testenv:py27]
basepython = python2.7
[testenv:pep8]
basepython = python3
commands =
flake8
# Run security linter
bandit -r oslo_utils -x tests -n5
[testenv:venv]
basepython = python3
commands = {posargs}
[testenv:docs]
basepython = python3
whitelist_externals = rm
deps =
-c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/train}
-r{toxinidir}/doc/requirements.txt
commands =
rm -fr doc/build
sphinx-build -W -b html doc/source doc/build/html
[testenv:cover]
basepython = python3
commands = python setup.py test --coverage --coverage-package-name=oslo_utils --testr-args='{posargs}'
[testenv:bandit]
basepython = python3
commands = bandit -r oslo_utils -x tests -n5
[flake8]
# E731 skipped as assign a lambda expression
ignore = E123,E731,H405
show-source = True
exclude=.venv,.git,.tox,dist,doc,*lib/python*,*egg,build,__init__.py
[testenv:releasenotes]
basepython = python3
deps =
{[testenv:docs]deps}
commands = sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
[testenv:lower-constraints]
basepython = python3
deps =
-c{toxinidir}/lower-constraints.txt
-r{toxinidir}/test-requirements.txt
-r{toxinidir}/requirements.txt