Code coverage
Reviewable should now show code coverage for PRs on the cockroach repository. These show up as thin colored bands at the beginning of lines, both for "before" and "after". You also see some general per-file stats next to the umbrella icon. Example: https://reviewable.io/reviews/cockroachdb/cockroach/109373 (expand intpool.go to see the devastating changes in coverage).A few notes:
by default, the colors are not very visible. They can be customized on your user's stylesheet; you can use this one - go to your account in the top right and under Custom stylesheet URL put https://gist.githack.com/RaduBerinde/c85444280536a93d04fcf93cb1c5eac7/raw/ec9d0d51e7a3f9b3508637cf58de6f3026936ce1/reviewable-codecov.css
the coverage shown is only that of unit tests in the Go packages that are changed by the PR.
for multi-commit PRs, coverage is only generated for the top commit and the base commit.
coverage data is generated by a new "check" (GitHub Action) called
PR code coverage (generate) / code-cover-gen (pull_request). If you open the review before this build completes, there is no coverage data. Once the build completes, coverage should show up once you refresh the page. If this action fails, please report it to me (but note that the check is not required and a failure will not block merging your PR). Note that if you see abuild/ghactions/changed-go-pkgs.sh: No such file or directoryerror, you just need to rebase your PR to pick up my change.there are some limitations: coverage will not be generated if the PR has more than 15 commits or if it modifies more than 20 go packages.
OUT OF DATE BELOW. I'll let someon else delete.
Coverage is computed in a nightly teamcity build. This coverage ignores any automatically generated files such as protocol buffers as well as binaries that aren't necessary for running cockroach. For more info see the coverage ignore file list.
You can view the coverage results at codecov.io/gh/cockroachdb/cockroach or coveralls.io/github/cockroachdb/cockroach.
Note: If a test fails no coverage is generated for that package which can lead to inconsistent coverage results from day to day.
Copyright (C) Cockroach Labs.
Attention: This documentation is provided on an "as is" basis, without warranties or conditions of any kind, either express or implied, including, without limitation, any warranties or conditions of title, non-infringement, merchantability, or fitness for a particular purpose.