-
Notifications
You must be signed in to change notification settings - Fork 35
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
Aggregate coverage value across packages #2
Comments
Hey @jnadler, thanks for bringing this up. I'm actually working on a project with such a structure now, and I ran into the same issue. I've got to implement a solution, I think I'll use: |
I think the following bash command should work for most projects: @jnadler, when run on your project, does this seem to work, and generate a line akin to: |
Alrighty, @jnadler I think the above fix should work. Please give it a try and let me know! |
Well that's closer, but in this project there are still some packages with no tests whatsoever, and so we get a vastly inflated coverage number (coverage is good in the packages with tests). That's no fault of your software however. I've just found this bug which seems to cover it: I'll close this as there seems to be nothing you can do until they fix that one. Thanks for the speedy response, and for sharing this tool!! |
I should mention - I think that change is good, and I appreciate that it doesn't depend on specific makefile setup. IMO it would be good to merge that change to master, though it might require a small change to the readme. |
I just tried this out - nice work btw!
Unfortunately it doesn't seem to work with multiple packages, which is a shame because a single coverage % value across the whole project is really the key thing I'm after. The value in the badge is the coverage from the first package only.
To test across all packages I ran
go test ./... -coverprofile=coverage.out && go tool cover -html=coverage.out -o=coverage.html
The text was updated successfully, but these errors were encountered: