diff --git a/.gitignore b/.gitignore index a3c7b50..52e1f93 100644 --- a/.gitignore +++ b/.gitignore @@ -6,5 +6,6 @@ *.test *.out *.kvsdb +coverage* .vscode \ No newline at end of file diff --git a/Makefile b/Makefile index ab0a987..271816a 100644 --- a/Makefile +++ b/Makefile @@ -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}" ./...