Skip to content

Commit

Permalink
Fix coverage upload
Browse files Browse the repository at this point in the history
Usage of `coverage` stores data in the internal `.coverage` file that is not supported^1
by codecov.
This results in silently (because we dont use fail option by default) not uploading coverage.

This fixes it by runnin `coverage xml` in coverage_report which outputs a compatible file in `coverage.xml`

1: https://docs.codecov.com/docs/supported-report-formats#non-supported-code-coverage-formats
  • Loading branch information
rgaudin committed Jun 7, 2024
1 parent 3856ce2 commit 7645a49
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ def report_cov(ctx: Context, *, html: bool = False):
"""report coverage"""
ctx.run("coverage combine", warn=True, pty=use_pty)
ctx.run("coverage report --show-missing", pty=use_pty)
ctx.run("coverage xml", pty=use_pty)
if html:
ctx.run("coverage html", pty=use_pty)

Expand Down

0 comments on commit 7645a49

Please sign in to comment.