Skip to content

Commit

Permalink
Merge pull request #87 from CosmWasm/coverage
Browse files Browse the repository at this point in the history
Add coverage to CI
  • Loading branch information
uint authored Dec 18, 2024
2 parents f8881b7 + 283b4fd commit 866e75f
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
18 changes: 18 additions & 0 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,21 @@ jobs:
run: cargo fmt --all
- name: cargo clippy --workspace
run: cargo clippy --workspace --all-features -- -D warnings
coverage:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Rust Cache
uses: Swatinem/rust-cache@v2
with:
shared-key: regular-${{ hashFiles('**/Cargo.lock') }}
- name: Install cargo-llvm-cov
uses: taiki-e/install-action@cargo-llvm-cov
- name: Generate code coverage
run: cargo llvm-cov --all-features --workspace --codecov --output-path lcov.info
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: lcov.info
fail_ci_if_error: true
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
lcov.info
/target
/Cargo.lock

0 comments on commit 866e75f

Please sign in to comment.