From e79b9013fe71ac9e54a3576d99ad95898ee52cff Mon Sep 17 00:00:00 2001 From: Steve Kowalik Date: Tue, 19 May 2020 12:28:33 +1000 Subject: [PATCH] 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. --- .github/workflows/check.yml | 2 +- .gitignore | 1 + tox.ini | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index 814c7dbb..14315a5b 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -24,4 +24,4 @@ jobs: if: matrix.python-version == 3.6 uses: codecov/codecov-action@v1 with: - file: ./.coverage + file: ./coverage.xml diff --git a/.gitignore b/.gitignore index d6b93bca..4ed40f01 100644 --- a/.gitignore +++ b/.gitignore @@ -39,6 +39,7 @@ /MANIFEST /PyGithub.egg-info/ /.coverage +/coverage.xml /.idea /developer.github.com/ /gh-pages/ diff --git a/tox.ini b/tox.ini index 196a78b3..086cc2e0 100644 --- a/tox.ini +++ b/tox.ini @@ -13,7 +13,7 @@ python = [testenv] deps = -rtest-requirements.txt -commands = pytest --cov=github {posargs} +commands = pytest --cov=github --cov-report=xml {posargs} [testenv:lint] basepython = python3.6