governance/tox.ini
Hervé Beraud eb5f038b13 Add doc/requirements
This project isn't released but uniformization can't hurt.

The origin of these changes was that 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 could meet similar 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: Ie0c8db6331630c5d3a379a9c8c2d87eb0a8fd207
2021-01-07 10:49:37 +01:00

69 lines
1.6 KiB
INI

[tox]
envlist = docs,linters
minversion = 3.1.1
skipsdist = True
ignore_basepython_conflict = True
[testenv]
usedevelop = True
basepython = python3
setenv =
VIRTUAL_ENV={envdir}
PYTHON=coverage run --source openstack_governance --parallel-mode
OS_STDOUT_CAPTURE=1
OS_STDERR_CAPTURE=1
OS_DEBUG=1
OS_LOG_CAPTURE=1
deps =
-r{toxinidir}/requirements.txt
-r{toxinidir}/test-requirements.txt
commands =
stestr run '{posargs}'
coverage combine
coverage html -d cover
coverage xml -o cover/coverage.xml
coverage report --show-missing
[testenv:linters]
basepython = python3
whitelist_externals = bash
commands =
osg-check-schema
bash -c "find {toxinidir} \
\( -name .tox -prune \) \
-o -type f -name '*.yaml' \
-print0 | xargs -0 yamllint"
{toxinidir}/tools/check_projects_yaml_alphabetized.sh
flake8
whereto {toxinidir}/doc/source/_extra/.htaccess {toxinidir}/doc/test/redirect-tests.txt
{toxinidir}/tools/validate_repositories.py
[testenv:validate-legacy]
envdir = {toxworkdir}/linters
commands =
{toxinidir}/tools/validate-legacy.py
[testenv:validate_atcs]
commands = {toxinidir}/tools/validate_atcs.py
[testenv:pep8]
commands =
flake8
[testenv:venv]
commands = {posargs}
[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:validate]
commands = python3 tools/validate_tags.py
[testenv:check-review-status]
deps =
requests
prettytable
commands = {toxinidir}/tools/check_review_status.py