aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDmitry Vyukov <dvyukov@google.com>2020-05-02 13:05:47 +0200
committerDmitry Vyukov <dvyukov@google.com>2020-05-02 14:12:25 +0200
commit5457883a514281287bbd81364c4e26e25828563d (patch)
tree4828ce9f9c8e0bdb124597df9dbf86a162e27d50
parentf8d0ffe005b99a7b8eb39acddcc81d5dae5dbe97 (diff)
tools/codecov.yml: add
Add configuratio file for codecov.io
-rw-r--r--.travis.yml2
-rw-r--r--Makefile2
-rw-r--r--tools/codecov.yml13
3 files changed, 15 insertions, 2 deletions
diff --git a/.travis.yml b/.travis.yml
index c04cf7aa8..b53944ffc 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 164a32642..9f2033bdd 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 000000000..01d059583
--- /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%