Skip to content

add coverage ci

add coverage ci #6

Workflow file for this run

name: Coverage
on:
pull_request:
branches: [ "main" ]
env:
CARGO_TERM_COLOR: always
jobs:
coverage:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
profile: minimal
components: rustfmt, clippy
- name: Install Tarpaulin
run: |
if ! command -v cargo-tarpaulin &> /dev/null
then
cargo install cargo-tarpaulin
fi
- name: Run Tarpaulin and Check Coverage
run: |
# cargo tarpaulin > tarpaulin-output.txt
# if ! grep -q "100% coverage" tarpaulin-output.txt; then
# echo "Coverage is below 100%"
# exit 1
# fi
cargo tarpaulin