Makefile 512 B

123456789101112131415
  1. .PHONY: init
  2. init:
  3. go install github.com/google/wire/cmd/wire@latest
  4. go install github.com/golang/mock/mockgen@latest
  5. .PHONY: mock
  6. mock:
  7. mockgen -source=internal/service/user.go -destination mocks/service/user.go
  8. mockgen -source=internal/repository/user.go -destination mocks/repository/user.go
  9. .PHONY: test
  10. test:
  11. go test -coverpkg=./internal/handler,./internal/service,./internal/repository -coverprofile=./.nunu/coverage.out ./test/server/...
  12. go tool cover -html=./.nunu/coverage.out -o coverage.html