grpc-go icon indicating copy to clipboard operation
grpc-go copied to clipboard

Re-enable coverage reporting

Open dfawley opened this issue 8 years ago • 1 comments

Coverage results should not block merging, as they did before.

Instructions: https://coveralls.zendesk.com/hc/en-us/articles/201342809-Go

dfawley avatar Nov 15 '17 22:11 dfawley

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/

easwars avatar Oct 18 '22 17:10 easwars

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 --cover only covering unit tests. It did not include coverage from e2e style tests. For this adding coverpkg=./... 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:

  1. Codecov app is still not installed for the repo. We still need to understand why codecov/patch and codecov/project actions 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.
  2. The comment currently has layout = "head" which should essentially only show diff coverage and files effected. However Additional details and impacted files section seems empty.
    • Could possibly be a sideeffect of above
  3. 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.

arvindbr8 avatar Oct 05 '23 20:10 arvindbr8