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

CI: separate "normal" tests from coverage/junit-generating tests #14

Merged
merged 1 commit into from
Jul 31, 2024

Conversation

matt-codecov
Copy link
Collaborator

@matt-codecov matt-codecov commented Jul 30, 2024

#12 failed a test but didn't get a test results comment because the later steps in the "Test" CI job were skipped on failure

this PR separates things into two test jobs:

  • "Test", which just runs cargo test and prints the regular output to stdout
  • "Test (Upload to Codecov)", which wraps cargo test in cargo llvm-cov and cargo2junit to emit coverage/test results and then uploads it all to Codecov

the second one does not print any test results to stdout, so if there are failures we will only be able to see them in the Codecov test results comment. if that comment is useful enough that we never need to look at the logs for the first one, then we can get rid of the first one

Copy link

codecov bot commented Jul 30, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 99.21%. Comparing base (c0a4b65) to head (88b923f).

✅ All tests successful. No failed tests found.

Additional details and impacted files
@@           Coverage Diff           @@
##             main      #14   +/-   ##
=======================================
  Coverage   99.21%   99.21%           
=======================================
  Files          17       17           
  Lines        7249     7249           
=======================================
  Hits         7192     7192           
  Misses         57       57           

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

Copy link
Collaborator

@Swatinem Swatinem left a comment

Choose a reason for hiding this comment

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

lgtm
Another idea would be to try cargo nextest, which can output junit automatically, and can also work together with llvm-cov. It does not support doctests though :-(

@matt-codecov matt-codecov merged commit f2533f7 into main Jul 31, 2024
5 checks passed
@matt-codecov matt-codecov deleted the pr14 branch July 31, 2024 16:51
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