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

Add C++ coverage in CI and upload all coverage reports to CodeCov #86

Merged
merged 5 commits into from
May 2, 2023
Merged

Add C++ coverage in CI and upload all coverage reports to CodeCov #86

merged 5 commits into from
May 2, 2023

Conversation

sarahmonod
Copy link
Contributor

@sarahmonod sarahmonod commented Apr 25, 2023

Issue number of the reported bug or feature request: #62

Describe your changes
This change will calculate the C++, Cython and Python coverage in CI, and upload the results to CodeCov. CodeCov then provides a PR hook to let you know if and how coverage has changed for any of these three.

Testing performed
I tested on a personal fork of the project, and have set-up the appropriate secrets for the official Bloomberg fork already. If everything goes well, this PR should be the only one necessary, and I feel more confident that it will now that I was able to test it on my own fork.

Additional context
See examples of what this would look like here:

Example PR causing coverage reduction: https://github.com/gusmonod/pystack/pull/11
Example PR causing no coverage reduction: https://github.com/gusmonod/pystack/pull/12

@sarahmonod sarahmonod self-assigned this Apr 25, 2023
Makefile Show resolved Hide resolved
@sarahmonod sarahmonod changed the title Adding C++ coverage report in actions Add C++ coverage in CI and upload all coverage reports to CodeCov Apr 27, 2023
@codecov-commenter
Copy link

codecov-commenter commented Apr 27, 2023

Codecov Report

❗ No coverage uploaded for pull request base (main@4727e7e). Click here to learn what that means.
Patch has no changes to coverable lines.

Additional details and impacted files
@@           Coverage Diff           @@
##             main      #86   +/-   ##
=======================================
  Coverage        ?   82.48%           
=======================================
  Files           ?       27           
  Lines           ?     3260           
  Branches        ?      226           
=======================================
  Hits            ?     2689           
  Misses          ?      571           
  Partials        ?        0           
Flag Coverage Δ
cpp 74.94% <0.00%> (?)
python_and_cython 96.64% <0.00%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

Makefile Show resolved Hide resolved
godlygeek and others added 5 commits May 2, 2023 15:42
The only thing the "build" workflow is used for is coverage testing.

Signed-off-by: Matt Wozniski <mwozniski@bloomberg.net>
Signed-off-by: Gus Monod <gmonod1@bloomberg.net>
Put them all in a single file and publish a report for both of them.

Signed-off-by: Gus Monod <gmonod1@bloomberg.net>
Now that the Cython code is also counted, we have a few more lines and
branches that aren't covered. This change makes it so that CI passes
even though, once we include the Cython code, the coverage is about 96%
instead of 100% as it was earlier.

Signed-off-by: Gus Monod <gmonod1@bloomberg.net>
Signed-off-by: Gus Monod <gmonod1@bloomberg.net>
@godlygeek godlygeek enabled auto-merge (rebase) May 2, 2023 20:05
Copy link
Contributor

@godlygeek godlygeek left a comment

Choose a reason for hiding this comment

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

LGTM

@godlygeek godlygeek merged commit 258732e into bloomberg:main May 2, 2023
@sarahmonod sarahmonod deleted the ccoverage-report branch May 2, 2023 20:06
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.

4 participants