tools/codecov.yml: add

Add configuratio file for codecov.io
This commit is contained in:
Dmitry Vyukov 2020-05-02 13:05:47 +02:00
parent f8d0ffe005
commit 5457883a51
3 changed files with 15 additions and 2 deletions

View File

@ -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:

View File

@ -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.

13
tools/codecov.yml Normal file
View File

@ -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%