Skip to content

Commit 502b73d

Browse files
ci: fix ci
1 parent 3fe94af commit 502b73d

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

Makefile

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,15 +49,17 @@ deps:
4949
.PHONY: test
5050
test:
5151
@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 ./...
5354
@echo "✓ All tests passed!"
5455

5556
# Run tests with coverage (needs sudo for E2E tests)
5657
.PHONY: test-coverage
5758
test-coverage:
5859
@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
6163
@echo "✓ Coverage report generated: coverage.html"
6264

6365
# CI checks (deps, test, build)

0 commit comments

Comments
 (0)