Skip to content

Merge test coverage with e2e tests in CI #21

@metafates

Description

@metafates

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

Metadata

Metadata

Assignees

Labels

No fields configured for Feature.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions