Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix coverage upload #44

Merged
merged 2 commits into from
Jun 7, 2024
Merged

Fix coverage upload #44

merged 2 commits into from
Jun 7, 2024

Conversation

rgaudin
Copy link
Member

@rgaudin rgaudin commented Jun 7, 2024

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

@rgaudin rgaudin requested a review from benoit74 June 7, 2024 16:42
@rgaudin rgaudin self-assigned this Jun 7, 2024
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
Copy link

codecov bot commented Jun 7, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 100.00%. Comparing base (3856ce2) to head (b141f30).

Additional details and impacted files
@@            Coverage Diff            @@
##              main       #44   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            1         1           
  Lines            8         8           
  Branches         1         1           
=========================================
  Hits             8         8           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Collaborator

@benoit74 benoit74 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, this is indeed what I used in offspot/metrics in a commit which I probably forgot to backport here, or maybe I was considering metrtics was in an edge case: offspot/metrics@241ef10 😔
We also realized recently kolibri and youtube weren't uploading coverage

Shouldn't we use the fail option then? (we could revert if upload fails to often, but it shouldn't be the case and it probably never happened in metrics)

@rgaudin
Copy link
Member Author

rgaudin commented Jun 7, 2024

Yes, I think we should have the fail option in the default ; let me add it here

@rgaudin rgaudin requested a review from benoit74 June 7, 2024 17:49
Copy link
Collaborator

@benoit74 benoit74 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@benoit74 benoit74 merged commit a9c5279 into main Jun 7, 2024
8 checks passed
@benoit74 benoit74 deleted the coverage-xml branch June 7, 2024 18:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants