6927cc4401
OpenStack CI does not run the docs environment, it's just for developer convenience. Add the doc8 to the general linter environment so that it's run during automatic testing. The general linter environment is pep8. Disable testing of history.rst since generated ChangeLog file gives an error: "doc/source/user/history.rst:150: D000 Inline emphasis start-string without end-string." Readd sphinx to test environment so that doc8 passes tests. Change-Id: Ia81eac686ff3a82273b1d306596c4731c86c36e6
77 lines
2.0 KiB
INI
77 lines
2.0 KiB
INI
[tox]
|
|
minversion = 2.0
|
|
envlist = cover,
|
|
docs,
|
|
pep8,
|
|
py27,
|
|
py34,
|
|
py35,
|
|
pylint,
|
|
update-states
|
|
|
|
[testenv]
|
|
setenv = VIRTUAL_ENV={envdir}
|
|
BRANCH_NAME=master
|
|
CLIENT_NAME=taskflow
|
|
install_command = {toxinidir}/tools/tox_install.sh {env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt} {opts} {packages}
|
|
# We need to install a bit more than just `test' because those drivers have
|
|
# custom tests that we always run
|
|
deps = .[test,workers,zookeeper,database,redis,eventlet]
|
|
commands = python setup.py testr --slowest --testr-args='{posargs}'
|
|
|
|
[testenv:docs]
|
|
deps = -r{toxinidir}/doc/requirements.txt
|
|
commands = sphinx-build -E -W -b html doc/source doc/build/html
|
|
doc8 doc/source
|
|
|
|
[testenv:update-states]
|
|
deps = {[testenv]deps}
|
|
pydot2
|
|
commands = {toxinidir}/tools/update_states.sh
|
|
|
|
[testenv:pep8]
|
|
commands =
|
|
flake8 {posargs}
|
|
doc8 doc/source
|
|
|
|
[testenv:pylint]
|
|
deps = {[testenv]deps}
|
|
pylint==0.26.0
|
|
commands = pylint --rcfile=pylintrc taskflow
|
|
|
|
[testenv:cover]
|
|
deps = {[testenv]deps}
|
|
coverage>=3.6
|
|
commands = python setup.py testr --coverage --testr-args='{posargs}'
|
|
|
|
[testenv:venv]
|
|
commands = {posargs}
|
|
|
|
[flake8]
|
|
builtins = _
|
|
exclude = .venv,.tox,dist,doc,*egg,.git,build,tools
|
|
|
|
[hacking]
|
|
import_exceptions = six.moves
|
|
taskflow.test.mock
|
|
unittest.mock
|
|
|
|
[doc8]
|
|
# Settings for doc8:
|
|
# Ignore doc/source/user/history.rst, it includes generated ChangeLog
|
|
# file that fails with "D000 Inline emphasis start-string without
|
|
# end-string."
|
|
ignore-path = doc/*/target,doc/*/build*
|
|
|
|
[testenv:py27]
|
|
deps = .[test,workers,zookeeper,database,redis,eventlet]
|
|
-r{toxinidir}/doc/requirements.txt
|
|
commands =
|
|
python setup.py testr --slowest --testr-args='{posargs}'
|
|
sphinx-build -b doctest doc/source doc/build
|
|
doc8 --ignore-path "doc/source/history.rst" doc/source
|
|
|
|
[testenv:releasenotes]
|
|
deps = -r{toxinidir}/doc/requirements.txt
|
|
commands = sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
|