Skip to content

Commit

Permalink
chore: add test coverage reporting job to CI
Browse files Browse the repository at this point in the history
  • Loading branch information
greenhat committed Jul 29, 2024
1 parent 5e787bc commit 0884a87
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -128,3 +128,32 @@ jobs:
with:
command: make
args: check-format

test_coverage:
name: Code coverage in tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
toolchain: ${{ env.CARGO_MAKE_TOOLCHAIN }}
override: true
- name: Cache Cargo
uses: actions/cache@v2
with:
path: |
~/.cargo/registry
~/.cargo/git
key: ${{ github.workflow }}-${{ github.job }}-toolchain-${{ env.CARGO_MAKE_TOOLCHAIN }}
- name: Install cargo-tarpaulin
run: |
cargo install cargo-tarpaulin
- name: Run tests and generate code coverage
run: |
cargo tarpaulin --avoid-cfg-tarpaulin --timeout=360 --out lcov
- name: Push code coverage results to coveralls.io
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
path-to-lcov: ./lcov.info

0 comments on commit 0884a87

Please sign in to comment.