initial import
This commit is contained in:
93
tox.ini
Normal file
93
tox.ini
Normal file
@ -0,0 +1,93 @@
|
||||
[tox]
|
||||
minversion = 3.1
|
||||
envlist = pep8
|
||||
skipsdist = True
|
||||
ignore_basepython_conflict = True
|
||||
|
||||
[testenv]
|
||||
skip_install = True
|
||||
install_command = python -m pip install {opts} {packages}
|
||||
basepython = python3
|
||||
passenv =
|
||||
OS_*
|
||||
pip: PIP_INSTALL
|
||||
setenv =
|
||||
VIRTUAL_ENV={envdir}
|
||||
LANG=en_US.UTF-8
|
||||
LANGUAGE=en_US:en
|
||||
LC_ALL=C
|
||||
OS_LOG_CAPTURE={env:OS_LOG_CAPTURE:true}
|
||||
OS_STDOUT_CAPTURE={env:OS_STDOUT_CAPTURE:true}
|
||||
OS_STDERR_CAPTURE={env:OS_STDERR_CAPTURE:true}
|
||||
pip: PIP_INSTALL={env:PIP_INSTALL:true}
|
||||
deps =
|
||||
-r{toxinidir}/test-requirements.txt
|
||||
pip: {toxinidir}
|
||||
|
||||
commands = stestr run {posargs}
|
||||
stestr slowest
|
||||
|
||||
[testenv:pep8]
|
||||
commands =
|
||||
flake8
|
||||
|
||||
[testenv:build]
|
||||
deps =
|
||||
pbr
|
||||
ruamel.yaml
|
||||
ansible-base
|
||||
|
||||
commands =
|
||||
ansible --version
|
||||
ansible-galaxy collection build --force {toxinidir} --output-path {toxinidir}/build_artifact
|
||||
|
||||
[testenv:linters]
|
||||
passenv = *
|
||||
deps =
|
||||
{[testenv]deps}
|
||||
commands =
|
||||
ansible-lint -vvv
|
||||
|
||||
[testenv:linters-2.9]
|
||||
passenv = {[testenv:linters]passenv}
|
||||
commands = {[testenv:linters]commands}
|
||||
deps =
|
||||
-r{toxinidir}/test-requirements-2.9.txt
|
||||
|
||||
[testenv:venv]
|
||||
deps =
|
||||
-r{toxinidir}/test-requirements.txt
|
||||
commands = {posargs}
|
||||
|
||||
[flake8]
|
||||
# W503 Is supposed to be off by default but in the latest pycodestyle isn't.
|
||||
# Also, both openstacksdk and Donald Knuth disagree with the rule. Line
|
||||
# breaks should occur before the binary operator for readability.
|
||||
# H4 are rules for docstrings. Maybe we should clean them?
|
||||
# E501,E402,H301 are ignored so we can import the existing
|
||||
# modules unchanged and then clean them in subsequent patches.
|
||||
ignore = W503,H4,E501,E402,H301
|
||||
show-source = True
|
||||
exclude=.venv,.git,.tox,dist,doc,*lib/python*,*egg,build,ansible_collections
|
||||
|
||||
[testenv:ansible]
|
||||
# Need to pass some env vars for the Ansible playbooks
|
||||
passenv = HOME USER ANSIBLE_*
|
||||
deps =
|
||||
{[testenv]deps}
|
||||
commands =
|
||||
/bin/bash {toxinidir}/ci/run-ansible-tests-collection.sh -e {envdir} {posargs}
|
||||
|
||||
# PIP job runs with Ansible-2.9
|
||||
[testenv:ansible-pip]
|
||||
deps =
|
||||
-r{toxinidir}/test-requirements-2.9.txt
|
||||
{toxinidir}
|
||||
passenv = {[testenv:ansible]passenv}
|
||||
commands = {[testenv:ansible]commands}
|
||||
|
||||
[testenv:ansible-2.9]
|
||||
deps =
|
||||
-r{toxinidir}/test-requirements-2.9.txt
|
||||
passenv = {[testenv:ansible]passenv}
|
||||
commands = {[testenv:ansible]commands}
|
Reference in New Issue
Block a user