Skip to content

Commit

Permalink
add test coverage workflow (#460)
Browse files Browse the repository at this point in the history
  • Loading branch information
danieleades authored Nov 29, 2023
1 parent 79e4687 commit 20f6186
Showing 1 changed file with 40 additions and 0 deletions.
40 changes: 40 additions & 0 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
on:
push:
branches: [master]
pull_request:

name: Code Coverage

jobs:
coverage:
name: coverage
runs-on: ubuntu-latest
steps:
- name: checkout source
uses: actions/checkout@v4

- name: Install Cap'n Proto
run: |
export DEBIAN_FRONTEND=noninteractive
sudo apt-get install -y capnproto libcapnp-dev
- uses: dtolnay/rust-toolchain@nightly

- name: Install cargo-llvm-cov
uses: taiki-e/install-action@cargo-llvm-cov

- name: Run llvm-cov
run: |
for features in \
"--no-default-features" \
"--features sync_reader" \
"--features unaligned"
do
cargo llvm-cov --no-report --doctests --workspace $features
done
cargo llvm-cov report --lcov --output-path lcov.info
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
files: lcov.info

0 comments on commit 20f6186

Please sign in to comment.