Skip to content

Commit d484978

Browse files
committed
Fix coverage upload
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
1 parent 3856ce2 commit d484978

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

CHANGELOG.md

+7-1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## [Unreleased]
9+
10+
### Fixed
11+
12+
- Coverage invoke task now generating coverage.xml which codecov will upload
13+
814
## [1.0.1] - 2024-04-19
915

1016
### Fixed
@@ -81,7 +87,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
8187
### Fixed
8288

8389
- Adjust Ruff rules ignored by default
84-
- Use `no-cache-dir` for package install
90+
- Use `no-cache-dir` for package install
8591

8692
## [0.1.4] - 2023-07-17
8793

tasks.py

+1
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ def report_cov(ctx: Context, *, html: bool = False):
2424
"""report coverage"""
2525
ctx.run("coverage combine", warn=True, pty=use_pty)
2626
ctx.run("coverage report --show-missing", pty=use_pty)
27+
ctx.run("coverage xml", pty=use_pty)
2728
if html:
2829
ctx.run("coverage html", pty=use_pty)
2930

0 commit comments

Comments
 (0)