From e60fdbeb33914c4d3442f5c60a00101e22647be1 Mon Sep 17 00:00:00 2001 From: Takashi Kajinami Date: Wed, 7 Feb 2024 12:36:33 +0900 Subject: [PATCH] Display coverage report ... for easy reference. Also make sure old data is purged. Change-Id: Ic5f0ec8e72db3a767625cb72489e396628e0237f --- .coveragerc | 8 ++++++++ .gitignore | 3 +-- tox.ini | 5 +++-- 3 files changed, 12 insertions(+), 4 deletions(-) create mode 100644 .coveragerc diff --git a/.coveragerc b/.coveragerc new file mode 100644 index 00000000..bc672a77 --- /dev/null +++ b/.coveragerc @@ -0,0 +1,8 @@ +[run] +branch = True +source = heat_dashboard +omit = heat_dashboard/tests/* + +[report] +ignore_errors = True + diff --git a/.gitignore b/.gitignore index 7980b2cb..d9fe46eb 100644 --- a/.gitignore +++ b/.gitignore @@ -38,13 +38,12 @@ pip-log.txt pip-delete-this-directory.txt # Unit test / coverage reports -htmlcov/ .tox/ .coverage .coverage.* +cover .cache nosetests.xml -coverage.xml *.cover .hypothesis/ ut_*_nose_results.html diff --git a/tox.ini b/tox.ini index 84b5aa0e..b1d58a7a 100644 --- a/tox.ini +++ b/tox.ini @@ -41,8 +41,9 @@ commands = {posargs} commands = coverage erase coverage run --source=heat_dashboard {toxinidir}/manage.py test {posargs:heat_dashboard.test.tests} --settings=heat_dashboard.test.settings - coverage xml - coverage html + coverage html -d cover + coverage xml -o cover/coverage.xml + coverage report [testenv:docs] deps = -c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}