fix: enable CGO for race detector in tests
- Add CGO_ENABLED=1 to CI test step - Add CGO_ENABLED=1 to Makefile test commands - Fixes: go: -race requires cgo; enable cgo by setting CGO_ENABLED=1
This commit is contained in:
4
Makefile
4
Makefile
@@ -49,11 +49,11 @@ help:
|
||||
# Development commands
|
||||
test:
|
||||
@echo "Running tests..."
|
||||
$(GO) test -v -race ./...
|
||||
CGO_ENABLED=1 $(GO) test -v -race ./...
|
||||
|
||||
test-coverage:
|
||||
@echo "Running tests with coverage..."
|
||||
$(GO) test -v -race -coverprofile=coverage.out ./...
|
||||
CGO_ENABLED=1 $(GO) test -v -race -coverprofile=coverage.out ./...
|
||||
$(GO) tool cover -html=coverage.out -o coverage.html
|
||||
@echo "Coverage report generated: coverage.html"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user