zuul-operator/tox.ini
James E. Blair 9f2f4ec145 Flake8 cleanups
Tox can now run the linters test.

The linters gate job is added.

Change-Id: If39545c928991baa47c919ab6b357bf47ca9ca90
2021-07-23 10:27:10 -07:00

45 lines
1.2 KiB
INI

[tox]
minversion = 1.6
skipsdist = True
envlist = linters,docs
[testenv]
basepython = python3
install_command = pip install {opts} {packages}
deps = -r{toxinidir}/requirements.txt
commands =
python setup.py testr --slowest --testr-args='{posargs}'
[testenv:bindep]
# Do not install any requirements. We want this to be fast and work even if
# system dependencies are missing, since it's used to tell you what system
# dependencies are missing! This also means that bindep must be installed
# separately, outside of the requirements files.
deps = bindep
commands = bindep test
[testenv:docs]
install_command = pip install {opts} {packages}
deps =
-r{toxinidir}/doc/requirements.txt
commands =
sphinx-build -E -W -d doc/build/doctrees -b html doc/source/ doc/build/html
[testenv:linters]
deps = flake8
commands =
flake8 {posargs}
[testenv:venv]
commands = {posargs}
[flake8]
# These are ignored intentionally in openstack-infra projects;
# please don't submit patches that solely correct them or enable them.
ignore = E124,E125,E129,E252,E402,E741,H,W503,W504
show-source = True
exclude = .venv,.tox,dist,doc,build,*.egg
per-file-ignores =
# Allow import * to create a superset of objects
zuul_operator/objects.py:F403,F405