-
Notifications
You must be signed in to change notification settings - Fork 89
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Track code coverage with
cargo-llvm-cov
and codecov.io (#277)
* Track code coverage with `cargo-llvm-cov` * Add changelog entry * Add coverage badge to the README
- Loading branch information
Showing
3 changed files
with
57 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
- Track code coverage with `cargo-llvm-cov` | ||
([#277](https://github.com/cosmos/ibc-rs/issues/277)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
name: Coverage | ||
on: | ||
pull_request: | ||
paths: | ||
- .github/workflows/rust.yml | ||
- .github/workflows/coverage.yml | ||
- Cargo.toml | ||
- ci/** | ||
- crates/** | ||
push: | ||
branches: | ||
- master | ||
|
||
permissions: | ||
contents: read | ||
|
||
concurrency: | ||
group: rust-ci-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
env: | ||
CARGO_INCREMENTAL: 0 | ||
CARGO_PROFILE_DEV_DEBUG: 1 | ||
CARGO_PROFILE_RELEASE_DEBUG: 1 | ||
RUST_BACKTRACE: short | ||
CARGO_NET_RETRY: 10 | ||
RUSTUP_MAX_RETRIES: 10 | ||
CARGO_TERM_COLOR: always | ||
|
||
jobs: | ||
coverage: | ||
name: Code Coverage | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Install Rust | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: stable | ||
override: true | ||
- name: Install cargo-llvm-cov | ||
uses: taiki-e/install-action@cargo-llvm-cov | ||
- name: Install cargo-nextest | ||
uses: taiki-e/install-action@nextest | ||
- name: Generate code coverage | ||
run: cargo llvm-cov nextest --all-features --lcov --output-path lcov.info | ||
- name: Upload coverage to Codecov | ||
uses: codecov/codecov-action@v3 | ||
with: | ||
files: lcov.info | ||
fail_ci_if_error: true | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters