Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Coverage target and docs #1011

Merged
merged 3 commits into from
Aug 25, 2023
Merged

Coverage target and docs #1011

merged 3 commits into from
Aug 25, 2023

Conversation

nirs
Copy link
Member

@nirs nirs commented Jul 30, 2023

Add coverage target and document how to run the tests and inspect coverage.

nirs added 3 commits July 30, 2023 19:12
This is a easy way to run:

    go tool cover -html=cover.out

The reported coverage depends on running one of the test targets (e.g.
make test).

Signed-off-by: Nir Soffer <[email protected]>
@nirs nirs changed the title Coverage Coverage target and docs Jul 30, 2023
@ShyamsundarR
Copy link
Member

Why do we need a coverage target? The coverage target is another target in the Makefile which is to ease understanding ho go coverage can be reported?

The discussed intention was to provide a coverage report at the end, that can then be a CI routine that covers if the current PR degrades coverage from the current branch coverage. Is this leading towards the same?

@nirs
Copy link
Member Author

nirs commented Jul 31, 2023

Why do we need a coverage target? The coverage target is another target in the Makefile which is to ease understanding ho go coverage can be reported?

For the same reason we need all the other targets in the makefile, all of them are just trivial wrappers using some tool that the developer can use manually.

We want that developers will check coverage when modifying the code and adding tests, and the way to make it happen is make it easy to inspect coverage.

The discussed intention was to provide a coverage report at the end, that can then be a CI routine that covers if the current PR degrades coverage from the current branch coverage. Is this leading towards the same?

Coverage report in the CI is orthogonal. This is more complicated and may require interaction with another service so it should not be the only way we have to inspect coverage.

@ShyamsundarR ShyamsundarR merged commit 8d2ed78 into RamenDR:main Aug 25, 2023
13 checks passed
@nirs nirs deleted the coverage branch September 7, 2023 23:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants