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 <torredil@amazon.com>
  • Loading branch information
torredil committed Feb 13, 2024
1 parent 56a4ff6 commit 391d3ec
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
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
5 changes: 4 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,10 @@ clean:

.PHONY: test
test:
go test -v -race ./cmd/... ./pkg/...
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:
Expand Down

0 comments on commit 391d3ec

Please sign in to comment.