ansible-role-redhat-subscri.../tox.ini
Emilien Macchi 93aa321a66 Initial commit
* .gitignore
* .gitreview
* Re-licensing to Apache 2.0
* ansible-requirements
* python dependencies (tox, setup, requirements)
* Fix some pep8 errors
* CI scripts

Depends-On: Ief06ef2fde45851df0c9cea4764dfe38c1777e46
Change-Id: Ibe4042308606e7ca2334f214d5b6bca006633adb
2017-12-13 20:53:08 +00:00

60 lines
1.6 KiB
INI

[tox]
minversion = 1.6
envlist = docs, linters
skipdist = True
[testenv]
usedevelop = True
install_command = pip install -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt} {opts} {packages}
deps = -r{toxinidir}/test-requirements.txt
setenv = VIRTUAL_ENV={envdir}
whitelist_externals = bash
[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]
commands = python setup.py build_sphinx
[testenv:pep8]
commands =
# Run hacking/flake8 check for all python files
bash -c "git ls-files | xargs grep --binary-files=without-match \
--files-with-match '^.!.*python$' \
--exclude-dir .tox \
--exclude-dir .git \
--exclude-dir .eggs \
--exclude-dir *.egg-info \
--exclude-dir dist \
--exclude-dir *lib/python* \
--exclude-dir doc \
| xargs flake8 --verbose"
[testenv:ansible-lint]
basepython=python2
commands =
bash ci-scripts/ansible-lint.sh
[testenv:linters]
deps =
-r{toxinidir}/test-requirements.txt
-r{toxinidir}/ansible-requirements.txt
commands =
{[testenv:pep8]commands}
{[testenv:ansible-lint]commands}
[testenv:venv]
commands = {posargs}
[flake8]
# E123, E125 skipped as they are invalid PEP-8.
# E265 deals withs paces inside of comments
show-source = True
ignore = E123,E125,E265
builtins = _