diff --git a/.pipelines/pipeline.yaml b/.pipelines/pipeline.yaml index a80061e854..944c90acaa 100644 --- a/.pipelines/pipeline.yaml +++ b/.pipelines/pipeline.yaml @@ -118,6 +118,7 @@ stages: displayName: "Run Tests" - bash: | + export CODECOV_TOKEN=$(CODECOV_TOKEN) bash <(curl -s https://codecov.io/bash) gocov convert coverage.out > coverage.json gocov-xml < coverage.json > coverage.xml diff --git a/Makefile b/Makefile index bc6b8950e1..f8f968f2e5 100644 --- a/Makefile +++ b/Makefile @@ -367,7 +367,7 @@ endif # run all tests .PHONY: test-all test-all: - go test -v -covermode count -coverprofile=coverage.out \ + go test -v -race -covermode atomic -coverprofile=coverage.out \ ./ipam/ \ ./log/ \ ./netlink/ \ diff --git a/codecov.yml b/codecov.yml new file mode 100644 index 0000000000..e09166f67b --- /dev/null +++ b/codecov.yml @@ -0,0 +1,32 @@ +codecov: + notify: + require_ci_to_pass: no + +coverage: + precision: 2 + round: down + range: "50...100" + status: + project: + default: + threshold: 0.5 + patch: + default: + threshold: 0.5 + changes: no + +parsers: + gcov: + branch_detection: + conditional: yes + loop: yes + method: no + macro: no + +comment: + layout: "header, diff" + behavior: default + require_changes: no + +ignore: + - "vendor/"