mirror of
https://github.com/YuzuZensai/netbird-kubernetes-operator.git
synced 2026-09-13 10:49:15 +00:00
Add codecov to Go unit tests (#282)
Adds code coverage to Go unit tests. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Chores** * Integrated automated unit test coverage reporting with Codecov integration * Restructured test execution to separate unit and end-to-end tests into distinct workflows <!-- end of auto-generated comment: release notes by coderabbit.ai -->
This commit is contained in:
@@ -40,9 +40,9 @@ docs/api-reference.md: $(shell find api) docs/.crd-ref-docs.yaml
|
||||
lint:
|
||||
@golangci-lint run ./...
|
||||
|
||||
.PHONY: test
|
||||
test: setup-envtest
|
||||
KUBEBUILDER_ASSETS="$(shell $(ENVTEST) use $(ENVTEST_K8S_VERSION) --bin-dir $(LOCALBIN) -p path)" go test -v $$(go list ./... | grep -v /e2e) -coverprofile cover.out
|
||||
.PHONY: test-unit
|
||||
test-unit: setup-envtest
|
||||
KUBEBUILDER_ASSETS="$(shell $(ENVTEST) use $(ENVTEST_K8S_VERSION) --bin-dir $(LOCALBIN) -p path)" go test -v ./... -coverprofile=coverage.txt
|
||||
|
||||
test-e2e: build-image
|
||||
cd ./test/e2e && IMG_REF=${IMG_REF} go test ./... -v -count 1
|
||||
|
||||
Reference in New Issue
Block a user