5e012776ad
This role pulls in zuul-jobs/system-config, etc. for roles into .cache. We don't want to flake8 them as part of this job; ignore the .cache subdir. This also avoids a broken release of ansible-compat per the linked bug (I'm assuming the next version will fix it, so optimistically not using <) Change-Id: I5cf3029e40fcc0e02ba4d104beb59a1c75509a77
48 lines
1.5 KiB
INI
48 lines
1.5 KiB
INI
[tox]
|
|
minversion = 3.2.0
|
|
skipsdist = True
|
|
envlist = linters
|
|
|
|
[testenv]
|
|
basepython = python3
|
|
deps = -r{toxinidir}/test-requirements.txt
|
|
|
|
[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]
|
|
deps =
|
|
-r{toxinidir}/doc/requirements.txt
|
|
commands =
|
|
sphinx-build -W -b html -d doc/build/doctrees doc/source doc/build/html
|
|
|
|
[testenv:linters]
|
|
allowlist_externals =
|
|
bash
|
|
{toxinidir}/tools/ansible-lint-roles-cache.sh
|
|
setenv =
|
|
# NOTE(ianw) : In the gate job openstack-zuul-jobs-linters this is
|
|
# overridden to the Zuul checkouts of the projects. Locally,
|
|
# tools/ansible-lint-roles-cache.sh will populate these for the
|
|
# linter.
|
|
ANSIBLE_ROLES_PATH={env:ANSIBLE_ROLES_PATH:{toxinidir}/.cache/ansible-lint/opendev/base-jobs/roles:{toxinidir}/.cache/ansible-lint/opendev/system-config/roles:{toxinidir}/.cache/ansible-lint/zuul/zuul-jobs/roles:{toxinidir}/.cache/ansible-lint/openstack/openstack-zuul-jobs/roles}
|
|
commands =
|
|
flake8 {posargs}
|
|
{toxinidir}/tools/ansible-lint-roles-cache.sh
|
|
ansible-lint
|
|
|
|
[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 = E125,E129,H
|
|
show-source = True
|
|
exclude = .venv,.tox,dist,doc,build,*.egg,.cache
|