aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShulhan <ms@kilabit.info>2023-05-14 17:54:32 +0700
committerShulhan <ms@kilabit.info>2023-05-14 17:54:32 +0700
commit3df554eb34b449dd5fad0239eb738beebe1debbb (patch)
tree0e81292291297181b5b82d2222da462773c71c6e
parentc65714879048a273136121fdc31e03aa63c7ab34 (diff)
downloadciigo-3df554eb34b449dd5fad0239eb738beebe1debbb.tar.xz
all: generate HTML test coverage on task test
-rw-r--r--.gitignore2
-rw-r--r--Makefile3
2 files changed, 4 insertions, 1 deletions
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)