-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
25 lines (19 loc) · 720 Bytes
/
Copy pathMakefile
File metadata and controls
25 lines (19 loc) · 720 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
.PHONY: test test-verbose test-coverage help
.DEFAULT_GOAL := help
help:
@echo "Available Make targets:"
@echo " test - Run all unit tests"
@echo " test-verbose - Run all unit tests (verbose output)"
@echo " test-coverage - Run all unit tests and generate coverage report"
test:
@echo "========== Running unit tests =========="
@go test ./...
test-verbose:
@echo "========== Running unit tests (verbose) =========="
@go test -v ./...
test-coverage:
@echo "========== Running unit tests with coverage =========="
@go test -coverprofile=coverage.out ./...
@go tool cover -html=coverage.out -o coverage.html
@echo "Coverage report generated: coverage.html"
@go tool cover -func=coverage.out