Skip to content

Commit

Permalink
Better coverage handling
Browse files Browse the repository at this point in the history
Use `coverage combine` with some more configuration in .coveragerc
to merge our own paths with the paths we copy to when running coverage
and tests in the django-haystack checkout.

Also, print the simple coverage report in the Github Actions workflow
for good measure.

Fixes: #205
  • Loading branch information
asedeno authored and claudep committed Sep 25, 2021
1 parent 35cbaaa commit 1a5b4cf
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
13 changes: 12 additions & 1 deletion .coveragerc
Expand Up @@ -7,5 +7,16 @@ exclude_lines =

[run]
source =
haystack/backends/xapian_backend.py
haystack.backends.xapian_backend
test_haystack/xapian_tests

[paths]
# Merge coverage data from running tests in a django-haystack
# checkout with our own paths for coverage reporting.
backend =
./
*/django-haystack/haystack/backends/

tests =
tests/xapian_tests/
*/django-haystack/test_haystack/xapian_tests/
3 changes: 2 additions & 1 deletion .github/workflows/test.yml
Expand Up @@ -98,7 +98,8 @@ jobs:

- name: Coveralls
run: |
cd django-haystack
coverage combine django-haystack/.coverage
coverage report
coveralls --service=github
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit 1a5b4cf

Please sign in to comment.