tripleo-common/tox.ini
Hervé Beraud 8e57c59eb5 Add doc/requirements
We need to specify doc requirements in doc/requirements.txt
to avoid problems with the pip resolver [1] for the release team [2][3].
Removed specific doc requirements from test-requirements.txt.

The problem here is that this repos haven't doc/requirements.txt file
and by default in this case zuul will use the test-requirements.txt file to
pull requirements [4].

This requirements file contains extra requirements like flake8 that
collided with those allowed in our job environment and so the new pip
resolver fails to install these requirements and the job exits in error.

This project meet the conditions leading to the bug.

[1] http://lists.openstack.org/pipermail/release-job-failures/2021-January/001500.html
[2] http://lists.openstack.org/pipermail/openstack-discuss/2021-January/019611.html
[3] http://lists.openstack.org/pipermail/openstack-discuss/2021-January/019612.html
[4] https://opendev.org/zuul/zuul-jobs/src/branch/master/roles/ensure-sphinx/tasks/main.yaml#L36

Change-Id: I737a7d7f6781abb84bd5213d0723bb14a48eb89f
2021-01-05 09:25:33 +01:00

103 lines
2.6 KiB
INI

[tox]
minversion = 3.8
envlist = linters,py38
skipsdist = True
# Automatic envs will only use the python version appropriate to that
# env and ignore basepython inherited from [testenv] if we set
# ignore_basepython_conflict.
ignore_basepython_conflict = True
[testenv]
basepython = python3
usedevelop = True
setenv =
ANSIBLE_FORCE_COLOR=1
ANSIBLE_INVENTORY={toxinidir}/tests/hosts.ini
ANSIBLE_NOCOWS=1
ANSIBLE_RETRY_FILES_ENABLED=0
ANSIBLE_STDOUT_CALLBACK=debug
PY_COLORS=1
# pip: Avoid 2020-01-01 warnings: https://github.com/pypa/pip/issues/6207
# paramiko CryptographyDeprecationWarning: https://github.com/ansible/ansible/issues/52598
PYTHONWARNINGS=ignore:DEPRECATION::pip._internal.cli.base_command,ignore::UserWarning
PIP_DISABLE_PIP_VERSION_CHECK=1
passenv =
ANSIBLE_*
CURL_CA_BUNDLE
DOCKER_*
PYTEST*
REQUESTS_CA_BUNDLE
SSH_AUTH_SOCK
SSL_CERT_FILE
TERM
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 {posargs}
whitelist_externals =
bash
tox
[testenv:bindep]
deps = bindep
commands = bash -c "{toxinidir}/scripts/bindep-install"
# deprecated: covered by linters
[testenv:pep8]
skip_install = true
deps =
commands =
tox -e linters -- flake8
[testenv:venv]
commands = {posargs}
[testenv:cover]
setenv =
PYTHON=coverage run --source tripleo_common --parallel-mode
commands =
coverage erase
stestr run {posargs}
coverage combine
coverage html -d cover
coverage xml -o cover/coverage.xml
coverage report
[testenv:docs]
deps = -c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
-r{toxinidir}/doc/requirements.txt
commands =
sphinx-build -W --keep-going -b html -d doc/build/doctrees doc/source doc/build/html
[testenv:debug]
commands = oslo_debug_helper {posargs}
# deprecated: covered by linters
[testenv:bashate]
skip_install = true
deps =
commands =
tox -e linters -- bashate
[testenv:linters]
skip_install = true
deps =
virtualenv>=20.0.20
pre-commit>=2.4.0
commands =
python -m pre_commit run -a {posargs:}
bash -c tools/check_duplicate_jinja_blocks.sh
[testenv:releasenotes]
deps = {[testenv:docs]deps}
commands = bash -c tools/releasenotes_tox.sh
[testenv:requirements]
deps =
-egit+https://opendev.org/openstack/requirements#egg=openstack-requirements
whitelist_externals = sh
commands =
sh -c '{envdir}/src/openstack-requirements/playbooks/files/project-requirements-change.py --req {envdir}/src/openstack-requirements --local {toxinidir} master'