From 2735ea8a2aef55ebb0a48b50d9a0e36cf3f63b94 Mon Sep 17 00:00:00 2001 From: Stamatis Katsaounis Date: Mon, 26 Nov 2018 11:25:29 +0200 Subject: Update tox to run htmllint and csslint JIRA: DOVETAIL-753 This patch adds a new tox environment to run htmllint and csslint. Furthermore, it fixes any leftover html and css errors. Change-Id: Ie3fda8d89b3d52851debe1a4271ffd0ac8fbee68 Signed-off-by: Stamatis Katsaounis --- tox.ini | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) (limited to 'tox.ini') diff --git a/tox.ini b/tox.ini index 6b1fb5d..404e32e 100644 --- a/tox.ini +++ b/tox.ini @@ -4,7 +4,7 @@ # and then run "tox" from this directory. [tox] -envlist = pep8,py27 +envlist = weblint,pep8,py27 skipsdist = True sitepackages = True @@ -18,7 +18,7 @@ deps = commands= py.test \ --basetemp={envtmpdir} \ - --cov \ + --cov=opnfv_testapi \ --cov-report term-missing \ --cov-report xml \ {posargs} @@ -26,9 +26,18 @@ setenv= HOME = {envtmpdir} PYTHONPATH = {toxinidir} +[testenv:weblint] +deps = nodeenv +commands = + nodeenv --force -r node-requirements.txt {envdir}/npmenv + bash -c 'ln -f -s {envdir}/npmenv/bin/node {envdir}/bin/node' + {envdir}/npmenv/bin/htmllint --cwd {toxinidir}/3rd_party/ + {envdir}/npmenv/bin/csslint {toxinidir}/3rd_party/ +whitelist_externals = bash + [testenv:pep8] deps = flake8 -commands = flake8 {toxinidir} +commands = flake8 opnfv_testapi [flake8] # H803 skipped on purpose per list discussion. -- cgit 1.2.3-korg