diff --git a/.gitignore b/.gitignore index e698d3d..36b7b6a 100644 --- a/.gitignore +++ b/.gitignore @@ -13,6 +13,7 @@ # Output of the go coverage tool, specifically when used with LiteIDE *.out +coverage.html # Dependency directories (remove the comment below to include it) # vendor/ diff --git a/Makefile b/Makefile index f3f2930..fdadf97 100644 --- a/Makefile +++ b/Makefile @@ -56,6 +56,13 @@ generate/auth/mocks: mockery --all --output=ms/auth/internal/service/mocks --dir=ms/auth/internal/service +.PHONY: run/test/coverage +run/test/coverage: + @echo 'Run test of auth tags and generate coverage.out file' + go test ./... -tags auth -coverprofile=coverage.out + @echo 'Generate coverage.html file' + go tool cover -html=coverage.out -o coverage.html + # ==================================================================================== # # BUILD # ==================================================================================== #