From 05c917b365c3156416cf52a5a2888fb6c139f803 Mon Sep 17 00:00:00 2001 From: gujin Date: Thu, 11 Jul 2019 13:48:51 +0800 Subject: [PATCH] Add cover into zuul check Change-Id: I00e6860674b165c9b6f7a33838df2a5e39444a42 --- .gitignore | 3 +++ .zuul.yaml | 1 + tox.ini | 14 ++++++++++++++ 3 files changed, 18 insertions(+) diff --git a/.gitignore b/.gitignore index 563bcd1..f1d9b8b 100644 --- a/.gitignore +++ b/.gitignore @@ -22,3 +22,6 @@ doc/build # pbr generates these AUTHORS ChangeLog + +.coverage +cover/ diff --git a/.zuul.yaml b/.zuul.yaml index caaa2f2..f2e40eb 100644 --- a/.zuul.yaml +++ b/.zuul.yaml @@ -38,6 +38,7 @@ - project: templates: + - openstack-cover-jobs - openstack-python3-train-jobs check: jobs: diff --git a/tox.ini b/tox.ini index 9ae56cf..5590843 100644 --- a/tox.ini +++ b/tox.ini @@ -73,3 +73,17 @@ commands = bandit -r kolla_cli [testenv:docs] basepython = python3 commands = ./builddocs.sh + +[testenv:cover] +basepython = python3 +setenv = VIRTUAL_ENV={envdir} + NOSE_WITH_COVERAGE=1 + NOSE_COVER_BRANCHES=1 + NOSE_COVER_HTML=1 + NOSE_COVER_HTML_DIR={toxinidir}/cover + PYTHON=coverage run --source kolla_cli --parallel-mode +commands = + stestr run {posargs} + coverage combine + coverage html -d cover + coverage xml -o cover/coverage.xml