diff --git a/.codecov.yml b/.codecov.yml new file mode 100644 index 0000000..a69cfa2 --- /dev/null +++ b/.codecov.yml @@ -0,0 +1,22 @@ +codecov: + notify: + require_ci_to_pass: yes + strict_yaml_branch: main # only use the latest copy on the main branch + +ignore: + - "model/v1/model.pb.go" + - "proto-gen/*/*" + +coverage: + precision: 2 + round: down + range: "85...100" + status: + project: + default: + enabled: yes + target: 85% + patch: + default: + enabled: yes + target: 90% diff --git a/.gitignore b/.gitignore index 6eae0f3..396dc68 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ .idea/ gen-*/ .proto-gen-polyglot/ +coverage.txt diff --git a/Makefile b/Makefile index dffdf5c..82f2a48 100644 --- a/Makefile +++ b/Makefile @@ -40,6 +40,7 @@ swagger-validate: clean: rm -rf *gen-* || true rm -rf .*gen-* || true + rm -rf coverage.txt .PHONY: thrift thrift: thrift-image clean $(THRIFT_FILES) diff --git a/README.md b/README.md index 449cfb6..396ea84 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,5 @@ # jaeger-idl [![Build Status][ci-img]][ci] +[![Coverage Status][cov-img]][cov] A set of shared Thrift and Protobuf data model definitions used by the Jaeger components. @@ -35,3 +36,5 @@ See [CONTRIBUTING](./CONTRIBUTING.md). [ci-img]: https://github.com/jaegertracing/jaeger-idl/actions/workflows/ci-unit-tests.yml/badge.svg [ci]: https://github.com/jaegertracing/jaeger-idl/actions/workflows/ci-unit-tests.yml +[cov-img]: https://codecov.io/gh/jaegertracing/jaeger-idl/branch/main/graph/badge.svg +[cov]: https://codecov.io/gh/jaegertracing/jaeger-idl/branch/main/