From 2512c6ef9dc02cf0af073385ed6ae0f507d0819b Mon Sep 17 00:00:00 2001 From: Chris Adams Date: Wed, 20 Mar 2019 10:17:10 -0400 Subject: [PATCH] coverage: workaround for XML reporting bug MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit There’s a bug in coverage.py when using the source specifier which causes the XML reports to omit the first element of the directory name, breaking some tools (this does not affect the HTML or text format reports). Using include instead avoids this problem until the upstream bug is resolved: https://github.com/nedbat/coveragepy/issues/578 --- .coveragerc | 22 ++++++++++++++++++---- .travis.yml | 3 ++- 2 files changed, 20 insertions(+), 5 deletions(-) diff --git a/.coveragerc b/.coveragerc index 17607abaa..d4a42e766 100644 --- a/.coveragerc +++ b/.coveragerc @@ -1,6 +1,20 @@ [run] branch = true -source = - concordia - importer - exporter +include = + concordia/* + importer/* + exporter/* + omit = + */migrations/* + */tests/* + concordia/settings* + +[report] +include = + concordia/* + importer/* + exporter/* +omit = + */migrations/* + */tests/* + concordia/settings* diff --git a/.travis.yml b/.travis.yml index 63e64a847..9cb40a31d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -34,7 +34,8 @@ script: - mkdir logs - touch ./logs/concordia-celery.log - pipenv run ./manage.py collectstatic --no-input - - pipenv run coverage run ./manage.py test concordia importer exporter + # n.b. + - pipenv run coverage run ./manage.py test - git diff --name-only $TRAVIS_COMMIT_RANGE | xargs pre-commit run --files - pipenv run safety check after_success: