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:
parent
f018caa06e
commit
2fc66e3502
@ -1,5 +1,6 @@
|
|||||||
- project:
|
- project:
|
||||||
templates:
|
templates:
|
||||||
|
- openstack-cover-jobs
|
||||||
- openstack-python37-jobs
|
- openstack-python37-jobs
|
||||||
- openstack-python3-wallaby-jobs
|
- openstack-python3-wallaby-jobs
|
||||||
check:
|
check:
|
||||||
|
6
tox.ini
6
tox.ini
@ -16,6 +16,7 @@ commands =
|
|||||||
|
|
||||||
whitelist_externals =
|
whitelist_externals =
|
||||||
bash
|
bash
|
||||||
|
find
|
||||||
distribute = false
|
distribute = false
|
||||||
|
|
||||||
[testenv:pep8]
|
[testenv:pep8]
|
||||||
@ -29,10 +30,13 @@ commands = {posargs}
|
|||||||
|
|
||||||
[testenv:cover]
|
[testenv:cover]
|
||||||
basepython = python3
|
basepython = python3
|
||||||
|
setenv =
|
||||||
|
{[testenv]setenv}
|
||||||
|
PYTHON=coverage run --source refstack_client --parallel-mode
|
||||||
commands =
|
commands =
|
||||||
coverage erase
|
coverage erase
|
||||||
find . -type f -name "*.pyc" -delete
|
find . -type f -name "*.pyc" -delete
|
||||||
stestr --test-path ./refstack_client/tests run {posargs}
|
stestr run {posargs}
|
||||||
coverage combine
|
coverage combine
|
||||||
coverage html -d cover
|
coverage html -d cover
|
||||||
coverage xml -o cover/coverage.xml
|
coverage xml -o cover/coverage.xml
|
||||||
|
Loading…
Reference in New Issue
Block a user