tox fixes

This commit is contained in:
Filip Valder
2017-04-24 13:03:47 +02:00
parent b24b1647ce
commit 83abaa4f6c

25
tox.ini
View File

@@ -7,6 +7,7 @@
envlist = py27, coverage, flake8, bandit
[testenv]
# using sitepackages is not a good idea, but Koji... :(
sitepackages = True
install_command = pip install --force-reinstall --ignore-installed {packages}
deps =
@@ -25,33 +26,19 @@ deps =
commands =
coverage run --parallel-mode -m pytest
coverage combine
coverage report --omit=.tox/* -m --skip-covered
coverage report --omit=tests/*,.tox/*,/usr/* -m --skip-covered
[testenv:flake8]
basepython = python2
skip_install = true
deps = flake8
commands = flake8 --ignore E501,E731 --exit-zero
commands = flake8 --ignore E501,E731
ignore_outcome = True
[testenv:bandit]
basepython = python2
skip_install = true
deps = bandit
commands =
/bin/bash -c "bandit -r $(find . -mindepth 1 -maxdepth 1 ! -name tests ! -name \.\* -type d -o -name \*.py) || exit 0"
[testenv:build]
basepython = python2
skip_install = true
deps = setuptools
commands = python setup.py sdist
[testenv:release]
basepython = python2
skip_install = true
deps =
{[testenv:build]deps}
twine
commands =
{[testenv:build]commands}
twine upload --skip-existing dist/* {posargs}
/bin/bash -c "bandit -r -ll $(find . -mindepth 1 -maxdepth 1 ! -name tests ! -name \.\* -type d -o -name \*.py)"
ignore_outcome = True