mirror of
https://pagure.io/fm-orchestrator.git
synced 2026-02-09 16:14:59 +08:00
58 lines
1.3 KiB
INI
58 lines
1.3 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 =
|
|
copr
|
|
mock
|
|
nose
|
|
pytest
|
|
vcrpy
|
|
commands = py.test {posargs}
|
|
|
|
[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}
|