From b9ab7407b4ed83aa07f5626a50451151f87ca047 Mon Sep 17 00:00:00 2001 From: Mathew Merrick Date: Fri, 8 May 2020 22:31:41 +0000 Subject: [PATCH 1/3] add codecov.yml --- .pipelines/pipeline.yaml | 1 + codecov.yml | 32 ++++++++++++++++++++++++++++++++ 2 files changed, 33 insertions(+) create mode 100644 codecov.yml 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/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/" From c974cc4fcd550c9379be17077b0ec6a7e658cfce Mon Sep 17 00:00:00 2001 From: Mathew Merrick Date: Fri, 8 May 2020 23:01:17 +0000 Subject: [PATCH 2/3] add race flag to tests --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index bc6b8950e1..893d2150bb 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 count -coverprofile=coverage.out \ ./ipam/ \ ./log/ \ ./netlink/ \ From e8c2cc78359cab07e5d72c874230fc104e019166 Mon Sep 17 00:00:00 2001 From: Mathew Merrick Date: Fri, 8 May 2020 23:06:02 +0000 Subject: [PATCH 3/3] make covermode atomic --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 893d2150bb..f8f968f2e5 100644 --- a/Makefile +++ b/Makefile @@ -367,7 +367,7 @@ endif # run all tests .PHONY: test-all test-all: - go test -v -race -covermode count -coverprofile=coverage.out \ + go test -v -race -covermode atomic -coverprofile=coverage.out \ ./ipam/ \ ./log/ \ ./netlink/ \