Add cover CI job and tox env

Change-Id: Idf6011265e5674fc0016771341f65fa2037cf510
This commit is contained in:
Federico Ressi 2019-04-24 08:20:23 +02:00
parent e9ba219c1d
commit f77e61faf9
4 changed files with 32 additions and 1 deletions

7
.coveragerc Normal file
View File

@ -0,0 +1,7 @@
[run]
branch = True
source = tobiko
omit = tobiko/tests/*
[report]
ignore_errors = True

3
.gitignore vendored
View File

@ -5,8 +5,9 @@
*.log
# Hidden files
.coverage
.coverage.*
.eggs
.coverage*
.stestr
.test
.testrepository

22
tox.ini
View File

@ -43,6 +43,28 @@ setenv =
commands = {[base]commands}
[testenv:cover]
basepython = python3
setenv =
{[testenv]setenv}
PYTHON=coverage run --parallel-mode
commands =
find . -type f -name ".coverage.*" -delete
coverage erase
stestr run --no-subunit-trace --black-regex "{env:OS_BLACK_REGEX:}" {posargs}
coverage combine
coverage html -d cover
coverage xml -o cover/coverage.xml
coverage report --fail-under=70 --skip-covered
find . -type f -name ".coverage.*" -delete
whitelist_externals=
find
# --- static analisys environments -------------------------------------------
[testenv:pep8]

View File

@ -12,6 +12,7 @@
- openstack-tox-py36
- openstack-tox-py37
- openstack-tox-py27
- openstack-tox-cover
- tobiko-devstack-neutron-centos-7
- tobiko-devstack-neutron-centos-7-queens
- tobiko-devstack-neutron-centos-7-rocky