Skip to content

add test coverage workflow #2

add test coverage workflow

add test coverage workflow #2

Workflow file for this run

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 nightly toolchain
uses: dtolnay/rust-toolchain@nightly
with:
components: llvm-tools-preview
- 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