The GoCover project started in 2014 and shutdown in 2023.
GoCover.io was a service that offered code coverage of any golang package.
GoCover gathered code coverage by executing a package's tests within an isolated Docker container.
@ncruces released go-coverage-report
, a GitHub Action that will generate goverage report on every commit and store it in Github (hidden in the your project's wiki).
You add this to your CI pipeline (after tests are run):
- name: Update coverage report
uses: ncruces/go-coverage-report@main
Then the badge is applied to the README.md
as such:
[![Go Coverage](https://github.com/USER/REPO/wiki/coverage.svg)](https://raw.githack.com/wiki/USER/REPO/coverage.html)
You can see it in action on: [`github.com/ncruces/julianday`](https://github.com/ncruces/julianday)