fix: enable CGO for race detector in tests
Some checks failed
CI / Test (pull_request) Waiting to run
CI / Lint (pull_request) Waiting to run
CI / Format Check (pull_request) Has been cancelled
CI / Build (pull_request) Has been cancelled

- 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:
2025-11-05 12:24:43 +01:00
parent 930b599af9
commit a1fc6e69a7
2 changed files with 4 additions and 2 deletions

View File

@@ -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"