Merge pull request #5 from netbirdio/feature/codecov

Add codecov to Go unit tests
This commit is contained in:
Philip Laine
2026-06-01 11:53:29 +02:00
committed by GitHub
3 changed files with 10 additions and 4 deletions
+7 -1
View File
@@ -30,4 +30,10 @@ jobs:
go mod tidy
git diff --exit-code
- name: Run unit tests
run: make -B test-unit
run: make test-unit
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@e79a6962e0d4c0c17b229090214935d2e33f8354 #v6.0.1
with:
token: ${{ secrets.CODECOV_TOKEN }}
flags: unit
+2 -2
View File
@@ -10,8 +10,8 @@ Dockerfile.cross
# Test binary, built with `go test -c`
*.test
# Output of the go coverage tool, specifically when used with LiteIDE
*.out
# Output of the go coverage tool.
coverage.txt
# Go workspace file
go.work
+1 -1
View File
@@ -9,7 +9,7 @@ lint:
.PHONY: test
test-unit:
@go test ./... -race
@go test ./... -race -coverprofile=coverage.txt
.PHONY: build
build: bin/linux-$(shell go env GOARCH)/netbird-kubeapi-proxy