fix(coverage): add coverage rc file
The tox coverage refers to a non-existing rc file. This patch set redresses this by putting in a proper .coveragerc file similar to all the other projects. This patchset also makes the tox coverage job compatible w/ Zuul. Change-Id: I96a3d13482053b591f7d01e1c5c1e906d84f8fb7 Depends-On: If3cba68492ba9c7a0e78258c7b669d1b39fcdeba Signed-off-by: Tin Lam <tin@irrational.io>
This commit is contained in:
parent
84694989b6
commit
c39d21eec8
7
.coveragerc
Normal file
7
.coveragerc
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
[run]
|
||||||
|
branch = True
|
||||||
|
source = armada
|
||||||
|
omit = armada/tests/*
|
||||||
|
|
||||||
|
[report]
|
||||||
|
ignore_errors = True
|
3
.stestr.conf
Normal file
3
.stestr.conf
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
[DEFAULT]
|
||||||
|
test_path=armada/tests/unit
|
||||||
|
top_dir=./
|
@ -7,11 +7,11 @@ sphinx_rtd_theme>=0.2.4
|
|||||||
|
|
||||||
# Testing
|
# Testing
|
||||||
bandit
|
bandit
|
||||||
codecov
|
coverage!=4.4,>=4.5.1 # Apache-2.0
|
||||||
|
testtools>=2.3.0 # MIT
|
||||||
|
os-testr>=1.0.0 # Apache-2.0
|
||||||
flake8>=3.3.0
|
flake8>=3.3.0
|
||||||
mock
|
mock
|
||||||
pytest==3.2.1
|
pytest==3.2.1
|
||||||
pytest-cov
|
|
||||||
pytest-mock
|
pytest-mock
|
||||||
responses>=0.8.1
|
responses>=0.8.1
|
||||||
testtools==2.3.0
|
|
||||||
|
19
tox.ini
19
tox.ini
@ -1,6 +1,6 @@
|
|||||||
[tox]
|
[tox]
|
||||||
skipsdist = True
|
skipsdist = True
|
||||||
envlist = py35, pep8, coverage, bandit
|
envlist = py35, pep8, cover, bandit
|
||||||
|
|
||||||
[testenv]
|
[testenv]
|
||||||
deps=
|
deps=
|
||||||
@ -53,15 +53,16 @@ commands =
|
|||||||
bandit -r armada -x armada/tests -n 5
|
bandit -r armada -x armada/tests -n 5
|
||||||
|
|
||||||
[testenv:cover]
|
[testenv:cover]
|
||||||
passenv=http_proxy https_proxy no_proxy HTTP_PROXY HTTPS_PROXY NO_PROXY
|
setenv = {[testenv]setenv}
|
||||||
setenv=
|
PYTHON=coverage run --source armada --parallel-mode
|
||||||
VIRTUAL_ENV={envdir}
|
|
||||||
commands =
|
commands =
|
||||||
python -m pytest \
|
coverage erase
|
||||||
--cov-branch \
|
find . -type f -name "*.pyc" -delete
|
||||||
--cov-report term-missing:skip-covered \
|
stestr run {posargs}
|
||||||
--cov-config .coveragerc \
|
coverage combine
|
||||||
--cov=armada
|
coverage html -d cover
|
||||||
|
coverage xml -o cover/coverage.xml
|
||||||
|
coverage report
|
||||||
|
|
||||||
[flake8]
|
[flake8]
|
||||||
filename = *.py
|
filename = *.py
|
||||||
|
Loading…
Reference in New Issue
Block a user