Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add coverage calculation and badge #127

Merged
merged 9 commits into from
Jan 25, 2025
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions .codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
codecov:
notify:
require_ci_to_pass: yes
after_n_builds: 18
yurishkuro marked this conversation as resolved.
Show resolved Hide resolved
strict_yaml_branch: main # only use the latest copy on the main branch

ignore:
- "model/v1/model.pb.go"
yurishkuro marked this conversation as resolved.
Show resolved Hide resolved

coverage:
precision: 2
round: down
range: "95...100"
status:
project:
default:
enabled: yes
target: 95%
patch:
default:
enabled: yes
target: 95%
19 changes: 13 additions & 6 deletions .github/workflows/ci-unit-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,20 @@ jobs:
- name: Run unit tests
run: make test-ci

- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v5
- name: upload code coverage
uses: Wandalen/wretry.action@v3.7.0
yurishkuro marked this conversation as resolved.
Show resolved Hide resolved
with:
slug: jaegertracing/jaeger-idl
verbose: true
fail_ci_if_error: true
token: 95fab3d9-8038-40ba-ac56-0d8bd91390a4
attempt_limit: 6
# sleep 10 seconds between retries
attempt_delay: 10000
action: codecov/codecov-action@v5
with: |
slug: jaegertracing/jaeger-idl
files: coverage.txt
flags: unittests
verbose: true
fail_ci_if_error: true
token: 95fab3d9-8038-40ba-ac56-0d8bd91390a4

test-code-gen:
runs-on: ubuntu-latest
Expand Down
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ swagger-validate:
clean:
rm -rf *gen-* || true
rm -rf .*gen-* || true
rm -rf coverage.txt
yurishkuro marked this conversation as resolved.
Show resolved Hide resolved

.PHONY: thrift
thrift: thrift-image clean $(THRIFT_FILES)
Expand Down
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -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.

Expand Down Expand Up @@ -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/