sarah-quinones / faer-rs

Linear algebra foundation for the Rust programming language
https://faer-rs.github.io
MIT License
1.82k stars 61 forks source link

add coverage #16

Closed oojo12 closed 1 year ago

oojo12 commented 1 year ago

This PR adds coverage reports to the repo. A few notes:

  1. It is slower than running cargo test due to remediation effort of an issue mentioned here - https://github.com/rust-lang/rust/issues/91092
  2. To enable you need to setup team bot -> https://docs.codecov.com/docs/team-bot
  3. Additionally, provide codecov access to GitHub -> https://docs.codecov.com/docs/github-oauth-application-authorization#troubleshooting

Theoretically I can update the action to use as many threads as there are logical CPU's for a speed boost. We'd just have less accurate coverage measures. Lemme know your thoughts.

oojo12 commented 1 year ago

example output seen here https://github.com/oojo12/faer-rs/pull/2

note that on subsequent runs a change will in coverage will be shown.

sarah-quinones commented 1 year ago

that looks interesting. is there a way to have it tell us which lines of code are not covered? i can't seem to find it

oojo12 commented 1 year ago

On a subsequent run if files reduce coverage it'll be output see https://github.com/nextest-rs/nextest/pull/625#issuecomment-1304278083

In terms of seeing how it stands today as far as I know it requires going to see the full report on codecov. But I'll look into it to see if it can be placed in the comments

codecov-commenter commented 1 year ago

Codecov Report

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

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #16 +/- ## ======================================= Coverage ? 87.23% ======================================= Files ? 31 Lines ? 13272 Branches ? 0 ======================================= Hits ? 11578 Misses ? 1694 Partials ? 0 ``` Help us with your feedback. Take ten seconds to tell us [how you rate us](https://about.codecov.io/nps?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=sarah). Have a feature suggestion? [Share it here.](https://app.codecov.io/gh/feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=sarah)

:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.

oojo12 commented 1 year ago

If you follow the steps in the description you'll be able to see something like this on codecov from your repo.

https://app.codecov.io/gh/oojo12/faer-rs

^ coverage info by package and files

Screenshot attached in case you can't view the page Screenshot_20221201-083130 Screenshot_20221201-083121

sarah-quinones commented 1 year ago

that looks great! thanks for the PR merging