From 722f1cc14189224d7d1188b9607c32b93df74081 Mon Sep 17 00:00:00 2001 From: takumin Date: Wed, 12 Jul 2023 13:01:34 +0000 Subject: [PATCH] Generate coverage html (#2170) Co-authored-by: Lunny Xiao Reviewed-on: https://gitea.com/xorm/xorm/pulls/2170 Co-authored-by: takumin Co-committed-by: takumin --- .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