Skip to content

Commit

Permalink
build: added coverage script
Browse files Browse the repository at this point in the history
  • Loading branch information
HotPotatoC committed Dec 23, 2021
1 parent a9814f7 commit d5117b5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,6 @@
*.test
*.out
*.kvsdb
coverage*

.vscode
5 changes: 5 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,11 @@ test: ## Run the tests
bench: ## Run the benchmarks
go test -bench=. -benchmem ./...

.PHONY: coverage
coverage: ## Generate coverage report
go test -coverprofile=coverage.out ./...
go tool cover -html=coverage.out -o coverage.html

.PHONY: install
install: ## Install the binary
go install -ldflags "${LDFLAGS}" ./...
Expand Down

0 comments on commit d5117b5

Please # to comment.