Skip to content

Commit

Permalink
Add run test coverage make cmd
Browse files Browse the repository at this point in the history
Also, update gitignore file
  • Loading branch information
jessicatarra committed Dec 12, 2023
1 parent a95b837 commit e8a40c7
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -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/
Expand Down
7 changes: 7 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
# ==================================================================================== #
Expand Down

0 comments on commit e8a40c7

Please sign in to comment.