summaryrefslogtreecommitdiffstats
path: root/tox.ini
diff options
context:
space:
mode:
authorStamatis Katsaounis <mokats@intracom-telecom.com>2018-10-09 15:16:25 +0300
committerStamatis Katsaounis <mokats@intracom-telecom.com>2018-10-15 12:13:29 +0300
commit235cb921e06fbc979276aca8d753084033678df2 (patch)
tree818451f53f27b52ba5fa990522c0bf1addb70f91 /tox.ini
parentedd6cfe15ecd4e2bf608c23c6ca4612334df044b (diff)
Add flake8 and yamllint tox environments and fix tox errors
JIRA: SDNVPN-231 This patch adds flake8 and yamllint tox environments. Furthermore, it fixes tox errors and applies general tox improvements. Change-Id: Id180695ef034562efb236932e6f783b0e91157c2 Signed-off-by: Stamatis Katsaounis <mokats@intracom-telecom.com>
Diffstat (limited to 'tox.ini')
-rw-r--r--tox.ini46
1 files changed, 41 insertions, 5 deletions
diff --git a/tox.ini b/tox.ini
index 69aa189..7880718 100644
--- a/tox.ini
+++ b/tox.ini
@@ -2,16 +2,52 @@
minversion = 1.6
envlist =
docs,
- docs-linkcheck
+ docs-linkcheck,
+ pep8,
+ yamllint
skipsdist = true
+[testenv]
+usedevelop = False
+setenv=
+ HOME = {envtmpdir}
+ PYTHONPATH = {toxinidir}
+deps =
+ -chttps://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt?h=master
+ -chttps://git.opnfv.org/functest/plain/upper-constraints.txt?h=master
+ -r{toxinidir}/test-requirements.txt
+ -r{toxinidir}/requirements.txt
+install_command = pip install {opts} {packages}
+
[testenv:docs]
-deps = -rdocs/requirements.txt
+basepython = python2.7
+deps = -r{toxinidir}/docs/requirements.txt
commands =
- sphinx-build -b html -n -d {envtmpdir}/doctrees ./docs/ {toxinidir}/docs/_build/html
+ sphinx-build -W -b html -n -d {envtmpdir}/doctrees ./docs/ {toxinidir}/docs/_build/html
echo "Generated docs available in {toxinidir}/docs/_build/html"
whitelist_externals = echo
[testenv:docs-linkcheck]
-deps = -rdocs/requirements.txt
-commands = sphinx-build -b linkcheck -d {envtmpdir}/doctrees ./docs/ {toxinidir}/docs/_build/linkcheck
+basepython = python2.7
+deps = -r{toxinidir}/docs/requirements.txt
+commands = sphinx-build -W -b linkcheck -d {envtmpdir}/doctrees ./docs/ {toxinidir}/docs/_build/linkcheck
+
+[testenv:yamllint]
+basepython = python2.7
+files =
+ {toxinidir}/docs
+ {toxinidir}/sdnvpn/test/functest/
+commands =
+ yamllint -s {[testenv:yamllint]files}
+
+[testenv:pep8]
+basepython = python2.7
+commands = flake8 {toxinidir}
+
+[flake8]
+# E123, E125 skipped as they are invalid PEP-8.
+
+show-source = True
+ignore = E123,E125
+builtins = _
+exclude = build,dist,doc,legacy,.eggs,.git,.tox,.venv,testapi_venv,venv