127a3443c0
Currently, we are overriding 'install_command' to use 'pip'. This is considered poor behavior and 'python -m pip' should be used instead: https://snarky.ca/why-you-should-use-python-m-pip/ It turns out that this is the the default value provided by tox: https://tox.readthedocs.io/en/latest/config.html#conf-install_command So we can remove the line and simply use the default value. Change-Id: Iafcae9fb2c7ae1046bec6fc38d9f57a6bff7e088
53 lines
1.6 KiB
INI
53 lines
1.6 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]
|
|
whitelist_externals = bash
|
|
passenv =
|
|
# NOTE(pabelanger): if you'd like to run tox -elinters locally, you'll need
|
|
# to export ANSIBLE_ROLES_PATH pointing to the currect repos.
|
|
# see openstack-zuul-jobs-linters job for more information.
|
|
ANSIBLE_ROLES_PATH
|
|
setenv =
|
|
ANSIBLE_LIBRARY= {toxinidir}/tests/fake-ansible
|
|
commands =
|
|
flake8 {posargs}
|
|
bash -c "find playbooks -type d -name "legacy" -prune -o \
|
|
-type f -regex '.*.y[a]ml' -print0 | xargs -t -n1 -0 \
|
|
ansible-lint"
|
|
bash -c 'find roles -maxdepth 1 -mindepth 1 -type d -printf "%p/\n" | \
|
|
xargs -t -n1 ansible-lint'
|
|
# Ansible Syntax Check
|
|
bash -c "cd playbooks; find . -type f -regex '.*.y[a]?ml' -exec \
|
|
ansible-playbook --syntax-check -i {toxinidir}/tests/inventory \{\} + > /dev/null"
|
|
|
|
[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
|