b2bd953ec2
Adds openstack-tox-linters job and edits the source code so that it complies with the ansible and yaml lint. Also creates requirements files, setup.* files and tox.ini one according the other ansible-role-* projects. Change-Id: If538c081a9f0f462714381baab002de5b403fde0
33 lines
703 B
INI
33 lines
703 B
INI
[tox]
|
|
minversion = 3.4.0
|
|
envlist = docs, linters
|
|
skipsdist = True
|
|
|
|
[testenv]
|
|
usedevelop = True
|
|
install_command = pip install -c{env:UPPER_CONSTRAINTS_FILE:https://opendev.org/openstack/requirements/raw/branch/master/upper-constraints.txt} {opts} {packages}
|
|
passenv =
|
|
ANSIBLE_*
|
|
CURL_CA_BUNDLE
|
|
DOCKER_*
|
|
HOME
|
|
REQUESTS_CA_BUNDLE
|
|
SSH_AUTH_SOCK
|
|
SSL_CERT_FILE
|
|
TERM
|
|
setenv = VIRTUAL_ENV={envdir}
|
|
deps = -r{toxinidir}/test-requirements.txt
|
|
whitelist_externals = bash
|
|
|
|
[testenv:linters]
|
|
basepython = python3
|
|
setenv =
|
|
ANSIBLE_LIBRARY=./library
|
|
commands =
|
|
# check only modified files:
|
|
python -m pre_commit run -a
|
|
|
|
[testenv:venv]
|
|
basepython = python3
|
|
commands = {posargs}
|