| |
@@ -7,8 +7,10 @@
|
| |
envlist = py27, py35, coverage, flake8, bandit
|
| |
|
| |
[testenv]
|
| |
- deps = pytest
|
| |
+ # using sitepackages is not a good idea, but Koji... :(
|
| |
sitepackages = True
|
| |
+ install_command = pip install --force-reinstall --ignore-installed {packages}
|
| |
+ deps = pytest
|
| |
commands = py.test {posargs}
|
| |
|
| |
[testenv:coverage]
|
| |
@@ -19,33 +21,19 @@
|
| |
commands =
|
| |
coverage run --parallel-mode -m pytest
|
| |
coverage combine
|
| |
- coverage report --include="freshmaker/*.py,fedmsg.d/*.py" --omit=.tox/* -m --skip-covered
|
| |
+ coverage report --omit=tests/*,.tox/*,/usr/* -m --skip-covered
|
| |
|
| |
[testenv:flake8]
|
| |
basepython = python3
|
| |
skip_install = true
|
| |
deps = flake8
|
| |
- commands = flake8 --ignore E501,E731 --exit-zero
|
| |
+ commands = flake8 --ignore E501,E731
|
| |
+ ignore_outcome = True
|
| |
|
| |
[testenv:bandit]
|
| |
basepython = python3
|
| |
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 = python3
|
| |
- skip_install = true
|
| |
- deps = setuptools
|
| |
- commands = python setup.py sdist
|
| |
-
|
| |
- [testenv:release]
|
| |
- basepython = python3
|
| |
- 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
|
| |
we can ignore files under freshmaker/migrations by excluding them here