Skip to content

Commit 5d85a96

Browse files
ci: add flags on codecov report (#356)
* test * ci: add flags on codecov report * use codecov uploader in place of codecov github action * use automatic flag management ci: set flags: java for javascore and rust for cosmwasm * Add separate badges on README file * feat: update paths to run the codecov for rust and java contracts Signed-off-by: Night Owl <nightowl121@protonmail.com> --------- Signed-off-by: Night Owl <nightowl121@protonmail.com> Co-authored-by: Night Owl <nightowl121@protonmail.com>
1 parent 0e3c9fb commit 5d85a96

File tree

4 files changed

+27
-3
lines changed

4 files changed

+27
-3
lines changed

.github/workflows/codecov-javascore.yml

+6-2
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,9 @@ on:
99
- main
1010
paths:
1111
- 'contracts/javascore/**'
12-
12+
- '.github/workflows/codecov-javascore.yml'
13+
env:
14+
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
1315
jobs:
1416
Coverage-Codecov:
1517
runs-on: ubuntu-latest
@@ -22,4 +24,6 @@ jobs:
2224
run: cd contracts/javascore && ./gradlew test
2325

2426
- name: Upload coverage to Codecov
25-
uses: codecov/codecov-action@v3
27+
uses: codecov/codecov-action@v3
28+
with:
29+
flags: java

.github/workflows/cosmwasm-contracts-code-coverage.yml

+2
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ on:
66
- "**"
77
paths:
88
- "contracts/cosmwasm-vm/**"
9+
- ".github/workflows/cosmwasm-contracts-code-coverage.yml"
910
push:
1011
branches:
1112
- main
@@ -35,4 +36,5 @@ jobs:
3536
with:
3637
token: ${{ secrets.CODECOV_TOKEN }}
3738
files: lcov.info
39+
flags: rust
3840
fail_ci_if_error: true

README.md

+9-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,12 @@
1-
[![codecov](https://codecov.io/gh/icon-project/IBC-Integration/branch/main/graph/badge.svg?token=8KX6y8aGom)](https://codecov.io/gh/icon-project/IBC-Integration)
1+
| Language | Code Coverage |
2+
| ----------------------------------- | ---------------------------------------------- |
3+
| [Java](./contracts/javascore) | [![Java Cov][java-cov-badge]][java-cov-link] |
4+
| [Rust](./contracts/cosmwasm-vm) | [![Rust Cov][rust-cov-badge]][rust-cov-link] |
5+
6+
[java-cov-link]: https://app.codecov.io/gh/icon-project/IBC-Integration/tree/main/contracts/javascore
7+
[rust-cov-link]: https://app.codecov.io/gh/icon-project/IBC-Integration/tree/main/contracts/cosmwasm-vm
8+
[java-cov-badge]: https://codecov.io/gh/icon-project/IBC-Integration/branch/main/graph/badge.svg?token=8KX6y8aGom&flag=java
9+
[rust-cov-badge]: https://codecov.io/gh/icon-project/IBC-Integration/branch/main/graph/badge.svg?token=8KX6y8aGom&flag=rust
210

311
# IBC-Integration
412
The Inter-Blockchain Communication protocol (IBC) is an end-to-end, connection-oriented, stateful protocol for reliable, ordered, and authenticated communication between heterogeneous blockchains arranged in an unknown and dynamic topology. xCall, a standard for generic cross-chain messaging along with IBC provides dynamic and coherent solution for inter-connected dapps.

codecov.yml

+10
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,16 @@ ignore:
1111
- "**/mock/*"
1212
- "libraries/rust/common/src/icon/*"
1313

14+
flag_management:
15+
default_rules: # the rules that will be followed for any flag added, generally
16+
carryforward: true
17+
statuses:
18+
- type: project
19+
target: auto
20+
threshold: 1%
21+
- type: patch
22+
target: 80%
23+
1424
coverage:
1525
precision: 2
1626
range: "50...100"

0 commit comments

Comments
 (0)