Skip to content

Commit

Permalink
Add code coverage report
Browse files Browse the repository at this point in the history
Signed-off-by: Eddie Torres <[email protected]>
  • Loading branch information
torredil committed Feb 14, 2024
1 parent 56a4ff6 commit 083cc6b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,9 @@ bin
# Test binary, build with `go test -c`
*.test

# Output of the go coverage tool, specifically when used with LiteIDE
# Output of the go coverage tool
*.out
coverage.html

# Vagrant
.vagrant
Expand Down
7 changes: 7 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,13 @@ clean:
test:
go test -v -race ./cmd/... ./pkg/...

.PHONY: test/coverage
test/coverage:
go test -v -race -coverprofile=cover.out ./cmd/... ./pkg/...
grep -v "mock" cover.out > filtered_cover.out
go tool cover -html=filtered_cover.out -o coverage.html
rm cover.out filtered_cover.out

.PHONY: test-sanity
test-sanity:
go test -v -race ./tests/sanity/...
Expand Down

0 comments on commit 083cc6b

Please sign in to comment.