Streamline messages #23
Workflow file for this run
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
name: Validate | |
on: pull_request | |
env: | |
RUSTFLAGS: "-C instrument-coverage" | |
LLVM_PROFILE_FILE: "ms1553b-%p-%m.profraw" | |
jobs: | |
test: | |
name: Test | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Install Rust toolchain | |
run: rustup update --no-self-update stable | |
- name: Install grcov | |
run: | | |
rustup component add llvm-tools-preview && | |
cargo install grcov | |
- name: Build the library | |
run: cargo test --no-run && rm -f *.profraw | |
- name: Test the library | |
run: cargo test | |
- name: Generate code coverage | |
run: | | |
grcov . -s . -b \ | |
$(find ./target/debug/deps ! -path -prune -name 'mil_*' ! -name '*.d') \ | |
-t cobertura \ | |
--branch \ | |
--ignore-not-existing \ | |
-o . | |
- name: Make coverage report | |
uses: 5monkeys/cobertura-action@v13 | |
with: | |
path: ./cobertura.xml | |
report_name: Code coverage | |
fail_below_threshold: true | |
minimum_coverage: 95 |