From 5457883a514281287bbd81364c4e26e25828563d Mon Sep 17 00:00:00 2001 From: Dmitry Vyukov Date: Sat, 2 May 2020 13:05:47 +0200 Subject: [PATCH] tools/codecov.yml: add Add configuratio file for codecov.io --- .travis.yml | 2 +- Makefile | 2 +- tools/codecov.yml | 13 +++++++++++++ 3 files changed, 15 insertions(+), 2 deletions(-) create mode 100644 tools/codecov.yml diff --git a/.travis.yml b/.travis.yml index c04cf7aa..b53944ff 100644 --- a/.travis.yml +++ b/.travis.yml @@ -27,7 +27,7 @@ script: - make presubmit after_success: - - bash <(curl -s https://codecov.io/bash) + - curl -s https://codecov.io/bash | bash -s - -y tools/codecov.yml # If the build fails because some code in not formatted, it's nice to see the diffs after formatting. after_failure: diff --git a/Makefile b/Makefile index 164a3264..9f2033bd 100644 --- a/Makefile +++ b/Makefile @@ -335,7 +335,7 @@ presubmit_parallel: test test_race arch test: descriptions ifeq ("$(TRAVIS)$(shell go version | grep 1.13)", "true") - # Collect coverage report for codecov.io when testing Go 1.12 on travis (uploaded in .travis.yml). + # Collect coverage report for codecov.io when testing Go 1.14 on travis (uploaded in .travis.yml). env CGO_ENABLED=1 $(GO) test -short -coverprofile=coverage.txt ./... else # Executor tests use cgo. diff --git a/tools/codecov.yml b/tools/codecov.yml new file mode 100644 index 00000000..01d05958 --- /dev/null +++ b/tools/codecov.yml @@ -0,0 +1,13 @@ +# See https://docs.codecov.io/docs/codecovyml-reference +# Validate with curl --data-binary @tools/codecov.yml https://codecov.io/validate + +coverage: + precision: 0 + round: nearest + range: "50...75" + +coverage: + status: + project: + default: + threshold: 1%