Skip to content

Commit e79b901

Browse files
Turn on coverage reporting for codecov (#1522)
Since we migrated from Travis to GitHub Actions, our coverage on codecov has been reporting as 0%, since uploading the .coverage file is a terrible idea. Turn on XML-based reporting, ignore the file and use that when we upload to codecov.
1 parent 291c463 commit e79b901

File tree

3 files changed

+3
-2
lines changed

3 files changed

+3
-2
lines changed

.github/workflows/check.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,4 @@ jobs:
2424
if: matrix.python-version == 3.6
2525
uses: codecov/codecov-action@v1
2626
with:
27-
file: ./.coverage
27+
file: ./coverage.xml

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@
3939
/MANIFEST
4040
/PyGithub.egg-info/
4141
/.coverage
42+
/coverage.xml
4243
/.idea
4344
/developer.github.com/
4445
/gh-pages/

tox.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ python =
1313

1414
[testenv]
1515
deps = -rtest-requirements.txt
16-
commands = pytest --cov=github {posargs}
16+
commands = pytest --cov=github --cov-report=xml {posargs}
1717

1818
[testenv:lint]
1919
basepython = python3.6

0 commit comments

Comments
 (0)