Files
fm-orchestrator/tox.ini

53 lines
1.2 KiB
INI

# Tox (http://tox.testrun.org/) is a tool for running tests
# in multiple virtualenvs. This configuration file will run the
# test suite on all supported python versions. To use it, "pip install tox"
# and then run "tox" from this directory.
[tox]
envlist = py27, coverage, flake8, bandit
[testenv]
sitepackages = True
install_command = pip install --force-reinstall --ignore-installed {packages}
deps = pytest
commands = py.test
[testenv:coverage]
basepython = python2
deps =
{[testenv]deps}
coverage
commands =
coverage run --parallel-mode -m pytest
coverage combine
coverage report --omit=.tox/* -m --skip-covered
[testenv:flake8]
basepython = python2
skip_install = true
deps = flake8
commands = flake8 --ignore E501,E731 --exit-zero
[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}