Feature
To display that nice coverage: X% in the README Testo uses coverage report from unit tests.
But there are also end-to-end tests (see here) - it would nice to include their coverage when generating that badge in GitHub workflow.
We can start from doing so in the Makefile first to ensure it works and then proceed with implementing it inside workflow.
As I hint, I can suggest running all tests (just add -tags e2e to go test) and ignore possible failures (some examples will fail but that is expected as they show how errors work).
Something like this:
go test -coverprofile=coverage.out -coverpkg=./... ./... # run all unit tests
go test -tags e2e -coverprofile=coverage.out -coverpkg=./... ./... || true # run all tests and ignore errors
Feature
To display that nice
coverage: X%in the README Testo uses coverage report from unit tests.But there are also end-to-end tests (see here) - it would nice to include their coverage when generating that badge in GitHub workflow.
We can start from doing so in the Makefile first to ensure it works and then proceed with implementing it inside workflow.
As I hint, I can suggest running all tests (just add
-tags e2etogo test) and ignore possible failures (some examples will fail but that is expected as they show how errors work).Something like this: