Add openstack cover job

The patch adds a new job which runs cover tox environment
to show code coverage by unit tests.

Change-Id: I888cd729b9a1dbe65a3380da357eafc1cc961b36
This commit is contained in:
Martin Kopec 2020-12-14 20:01:16 +00:00
parent f018caa06e
commit 2fc66e3502
2 changed files with 6 additions and 1 deletions

View File

@ -1,5 +1,6 @@
- project:
templates:
- openstack-cover-jobs
- openstack-python37-jobs
- openstack-python3-wallaby-jobs
check:

View File

@ -16,6 +16,7 @@ commands =
whitelist_externals =
bash
find
distribute = false
[testenv:pep8]
@ -29,10 +30,13 @@ commands = {posargs}
[testenv:cover]
basepython = python3
setenv =
{[testenv]setenv}
PYTHON=coverage run --source refstack_client --parallel-mode
commands =
coverage erase
find . -type f -name "*.pyc" -delete
stestr --test-path ./refstack_client/tests run {posargs}
stestr run {posargs}
coverage combine
coverage html -d cover
coverage xml -o cover/coverage.xml