Generate coverage html (#2170)

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Reviewed-on: https://gitea.com/xorm/xorm/pulls/2170
Co-authored-by: takumin <takumiiinn@gmail.com>
Co-committed-by: takumin <takumiiinn@gmail.com>
This commit is contained in:
takumin 2023-07-12 13:01:34 +00:00 committed by Lunny Xiao
parent 3b53a5f847
commit 722f1cc141
2 changed files with 5 additions and 3 deletions

1
.gitignore vendored
View File

@ -38,3 +38,4 @@ test.db
integrations/*.sql integrations/*.sql
integrations/test_sqlite* integrations/test_sqlite*
cover.out cover.out
cover.html

View File

@ -60,7 +60,7 @@ build: go-check $(GO_SOURCES)
.PHONY: clean .PHONY: clean
clean: clean:
$(GO) clean -i ./... $(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 .PHONY: coverage
coverage: coverage:
@ -132,7 +132,8 @@ golangci-lint-check:
.PHONY: test .PHONY: test
test: go-check 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 .PNONY: test-cockroach
test-cockroach: go-check test-cockroach: go-check