From 3df554eb34b449dd5fad0239eb738beebe1debbb Mon Sep 17 00:00:00 2001 From: Shulhan Date: Sun, 14 May 2023 17:54:32 +0700 Subject: all: generate HTML test coverage on task test --- .gitignore | 2 ++ Makefile | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index ff0fbbd..f22556d 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,5 @@ /ciigo-example /_bin *.html +cover.out +cover.html diff --git a/Makefile b/Makefile index ec2a6e6..8d3c9a3 100644 --- a/Makefile +++ b/Makefile @@ -14,7 +14,8 @@ lint: test: go run ./cmd/ciigo-example embed - CGO_ENABLED=1 go test -failfast -v -race -p=1 ./... + CGO_ENABLED=1 go test -failfast -v -race -p=1 -coverprofile=cover.out ./... + go tool cover -html=cover.out -o cover.html install: build mv _bin/ciigo $(GOBIN) -- cgit v1.3