From 64c5f295bba20e33e693e5ad24d4fc2d78542c26 Mon Sep 17 00:00:00 2001 From: takumin Date: Tue, 23 Aug 2022 19:28:22 +0900 Subject: [PATCH] Generate coverage html --- .gitignore | 3 ++- Makefile | 5 +++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index a183a295..4cd4252b 100644 --- a/.gitignore +++ b/.gitignore @@ -37,4 +37,5 @@ test.db.sql test.db integrations/*.sql integrations/test_sqlite* -cover.out \ No newline at end of file +cover.out +cover.html diff --git a/Makefile b/Makefile index b43c4a4c..ade90e6d 100644 --- a/Makefile +++ b/Makefile @@ -60,7 +60,7 @@ build: go-check $(GO_SOURCES) .PHONY: clean clean: $(GO) clean -i ./... - rm -rf *.sql *.log test.db *coverage.out coverage.all integrations/*.sql + rm -rf *.sql *.log test.db cover.out cover.html *coverage.out coverage.all integrations/*.sql .PHONY: coverage coverage: @@ -132,7 +132,8 @@ golangci-lint-check: .PHONY: test test: go-check - $(GO) test $(PACKAGES) + $(GO) test -cover -coverprofile=cover.out $(PACKAGES) + $(GO) tool cover -html=cover.out -o cover.html .PNONY: test-cockroach test-cockroach: go-check