-
Notifications
You must be signed in to change notification settings - Fork 224
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
79e4687
commit 20f6186
Showing
1 changed file
with
40 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,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 |