Skip to content

Commit

Permalink
set up code coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
Geal committed Jul 26, 2024
1 parent d6e27db commit 9e03a8b
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,33 @@ jobs:
run: cargo build --verbose
- name: Run tests
run: cargo test --verbose

coverage:
name: Coverage
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v2
- name: Install rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
profile: minimal
override: true
- name: Cache
uses: Swatinem/rust-cache@v1
- name: Install cargo-tarpaulin
uses: actions-rs/cargo@v1
with:
command: install
args: cargo-tarpaulin
- name: Run cargo tarpaulin
uses: actions-rs/cargo@v1
with:
command: tarpaulin
args: --output-dir coverage --out xml --workspace --tests --example log --example rfc5424 --example write
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v4.0.1
with:
token: ${{ secrets.CODECOV_TOKEN }}
slug: Geal/rust-syslog

0 comments on commit 9e03a8b

Please sign in to comment.