Skip to content

Commit

Permalink
Merge pull request #7 from hokkung/feat/add-test-cov
Browse files Browse the repository at this point in the history
add test cov
  • Loading branch information
hokkung authored Jun 20, 2024
2 parents 591a4cb + 2830221 commit 14b2918
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,5 @@ go.work
/bin*

.idea

coverage.*
10 changes: 9 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,17 @@ lint:
.PHONY: test
test: build
@echo "start running test"
go test -cover ./...
GOARCH=amd64 go test -cover ./...
@echo "finished running test"

.PHONY: test-cov
test-cov:
@echo "start running test coverage 😱😱😱"
GOARCH=amd64 go test ./... -coverprofile=coverage.out.tmp
cat coverage.out.tmp | grep -v "mock" > coverage.out
go tool cover -html=coverage.out -o coverage.html
open coverage.html
@echo "done test! good job bro! πŸŽ‰πŸŽ‰πŸŽ‰"

.PHONY: build
build: lint
Expand Down

0 comments on commit 14b2918

Please sign in to comment.