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 test coverage reporting (and uploading to codecov)? #133

Closed
liamsi opened this issue Jan 27, 2020 · 5 comments
Closed

Add test coverage reporting (and uploading to codecov)? #133

liamsi opened this issue Jan 27, 2020 · 5 comments

Comments

@liamsi
Copy link
Member

liamsi commented Jan 27, 2020

We could look into https://github.com/libra/libra/blob/ead737947aa59499ea75b5a926d221ac089ce803/.circleci/config.yml#L51-L58
and
https://github.com/libra/libra/blob/ead737947aa59499ea75b5a926d221ac089ce803/scripts/coverage_report.sh#L97-L104
for a good example how to do this.

@tarcieri
Copy link
Contributor

You might also check out Tarpaulin

@liamsi
Copy link
Member Author

liamsi commented Jan 27, 2020

Thanks, will look into it, too. Would Tarpulin be your tool of choice here?

@tarcieri
Copy link
Contributor

It's the main one I've worked with in the past. I know some people have had issues with it, but it seems fairly popular.

@liamsi
Copy link
Member Author

liamsi commented Jan 27, 2020

Just to visualize this a little; this is output generated via grcov (generated on branch ismail/light_cleanup, commit 7012553)
image
file view:
image

Both Tarpulin and grcov can report on the diff (locally and via coverall.io for instance)
(example project using Tarpulin: https://coveralls.io/github/xd009642/keygraph-rs?branch=master)

Tarpulin doesn't run natively on Macs but docker images are provided. In general Tarpulin seems a bit easier to use to me.

P.S. IntelliJ (never disappoints me and) has test coverage reporting integrated into the IDE. They use grcov apparently. I have a slight preference for grcov as numbers reported by the CI will match my local way of detecting test-coverage but that's probably not the best reason :-D

@liamsi
Copy link
Member Author

liamsi commented Jan 31, 2020

Closed via #134 (with grcov; if need arises we can switch to another code coverage tool)
Another issue deals with CI #135

@liamsi liamsi closed this as completed Jan 31, 2020
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

No branches or pull requests

2 participants