Add a code coverage check to the CI pipeline #84

Merged
wojtek merged 5 commits from 83---add-a-code-coverage-check-to-the-ci-pipeline into main 2024-01-06 19:49:41 +01:00
Showing only changes of commit d1eb08c783 - Show all commits

View File

@ -7,19 +7,21 @@ on:
branches: [ main ]
env:
BEETSDIR: ./
CARGO_TERM_COLOR: always
LLVM_PROFILE_FILE: target/debug/profraw/musichoard-%p-%m.profraw
RUSTFLAGS: -C instrument-coverage
CARGO_TERM_VERBOSE: true
jobs:
build_and_test:
name: Build and Test
container: docker.io/drrobot/musichoard-ci:rust-1.75
env:
BEETSDIR: ./
LLVM_PROFILE_FILE: target/debug/profraw/musichoard-%p-%m.profraw
RUSTFLAGS: -C instrument-coverage
steps:
- uses: actions/checkout@v3
- run: cargo build --verbose --all-features --all-targets
- run: cargo test --verbose --all-features --all-targets --no-fail-fast
- run: cargo build --all-features --all-targets
- run: cargo test --all-features --all-targets --no-fail-fast
- run: >-
grcov target/debug/profraw
--binary-path ./target/debug/
@ -41,5 +43,5 @@ jobs:
container: docker.io/drrobot/musichoard-ci:rust-1.75
steps:
- uses: actions/checkout@v3
- run: cargo clippy --verbose --all-features --all-targets -- -D warnings
- run: cargo fmt --verbose -- --check
- run: cargo clippy --all-features --all-targets -- -D warnings
- run: cargo fmt -- --check