Re-enable coverage reporting
Coverage results should not block merging, as they did before.
Instructions: https://coveralls.zendesk.com/hc/en-us/articles/201342809-Go
Some possibility avenues to look into for code coverage with GitHub Actions: https://github.com/tj-actions/coverage-badge-go https://gist.github.com/Harold2017/d98607f242659ca65e731c688cb92707 https://medium.com/synechron/how-to-set-up-a-test-coverage-threshold-in-go-and-github-167f69b940dc https://about.codecov.io/blog/getting-started-with-code-coverage-for-golang/
We decided to go forward with using Codecov - since it seems to be the popular option within gRPC repos.
-
While working on the coverage we had a cumulative problem of
go test --coveronly covering unit tests. It did not include coverage from e2e style tests. For this addingcoverpkg=./...worked which includes coverage of tests. -
Since most of the changes are to the main module, it makes sense to limit the scope of presubmit check to only run go test --cover for the main module.
-
Ignored the following paths in codecov. since we dont have to account for coverages in the following files "test/" "benchmark/" "internal/testutils" ".*.pb.go"
However, keeping this issue open to track the following:
- Codecov app is still not installed for the repo. We still need to understand why
codecov/patchandcodecov/projectactions need to be run.- There are indications of the actions populating the comment in the PR to show diff coverage.
- gRPC-Java uses the results of the action to understand diff coverage, however they have disabled comments.
- The comment currently has
layout = "head"which should essentially only show diff coverage and files effected. HoweverAdditional details and impacted filessection seems empty.- Could possibly be a sideeffect of above
- Ive noticed runs of codecov/upload which does not fail if upload failed. However this would just currently result in no coverage reports on the PR. However if there are issues while running upload on push to master, im not sure if this would effect calculations of diff coverage.