File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -49,15 +49,17 @@ deps:
49
49
.PHONY : test
50
50
test :
51
51
@echo " Running tests..."
52
- go test -v -race ./...
52
+ @which go > /dev/null || (echo " Go not found in PATH" && exit 1)
53
+ sudo $(shell which go) test -v -race ./...
53
54
@echo " ✓ All tests passed!"
54
55
55
56
# Run tests with coverage (needs sudo for E2E tests)
56
57
.PHONY : test-coverage
57
58
test-coverage :
58
59
@echo " Running tests with coverage..."
59
- go test -v -race -coverprofile=coverage.out ./...
60
- go tool cover -html=coverage.out -o coverage.html
60
+ @which go > /dev/null || (echo " Go not found in PATH" && exit 1)
61
+ sudo $(shell which go) test -v -race -coverprofile=coverage.out ./...
62
+ $(shell which go) tool cover -html=coverage.out -o coverage.html
61
63
@echo " ✓ Coverage report generated: coverage.html"
62
64
63
65
# CI checks (deps, test, build)
You can’t perform that action at this time.
0 commit comments