[feat] adding-tox-testing

- tox commands
- docs update

Change-Id: Ie6caa498d6017822e095ee5b001124074e2755aa
This commit is contained in:
Alexis Rivera De La Torre
2017-08-10 01:22:21 +00:00
parent 978ab7481b
commit d17485f8b9
6 changed files with 65 additions and 34 deletions

41
tox.ini
View File

@@ -1,26 +1,47 @@
[tox]
envlist = py27
skipsdist = True
envlist = py27, pep8, coverage, bandit
[testenv]
deps=
-r{toxinidir}/requirements.txt
-r{toxinidir}/test-requirements.txt
setenv=
PYTHONWARNINGS=all
VIRTUAL_ENV={envdir}
usedevelop = True
commands =
find . -type f -name "*.pyc" -delete
python -V
py.test -vvv -s --ignore=hapi
[testenv:docs]
commands = python setup.py build_sphinx
commands =
python setup.py build_sphinx
[testenv:genconfig]
commands = oslo-config-generator --config-file=etc/armada/config-generator.conf
commands =
oslo-config-generator --config-file=etc/armada/config-generator.conf
[testenv:lint]
commands = flake8 .
[testenv:pep8]
deps=
{[testenv]deps}
commands =
flake8 {posargs}
[testenv:testing]
commands = nosetest -w armada
[testenv:bandit]
deps = .[bandit]
commands =
bandit -r armada -x armada/tests -n 5
[flake8] #TODO: Remove E402
ignore=E302,H306,E402,W503
[testenv:coverage]
deps=
{[testenv]deps}
commands =
nosetests -w armada/tests/unit --cover-package=armada --with-coverage --cover-tests --exclude=.tox
[flake8]
filename= *.py
ignore = W503,E302
exclude= .git, .idea, .tox, *.egg-info, *.eggs, bin, dist, hapi