Go to file
Wojciech Kozlowski 2d25b15f3c
Some checks failed
Cargo CI / Lint (pull_request) Failing after 58s
Cargo CI / Build and Test (pull_request) Successful in 1m16s
Add unit tests
2024-01-07 11:04:06 +01:00
.gitea Add some helpful messages to coverage script 2024-01-07 10:33:21 +01:00
src Add unit tests 2024-01-07 11:04:06 +01:00
tests Database and library made optional 2024-01-07 10:21:33 +01:00
.gitignore Add integration tests to CI (#82) 2024-01-06 16:14:07 +01:00
Cargo.lock Add artist metadata fields (#69) 2023-05-21 17:24:00 +02:00
Cargo.toml Add artist metadata fields (#69) 2023-05-21 17:24:00 +02:00
README.md Add a code coverage check to the CI pipeline (#84) 2024-01-06 19:49:41 +01:00

Music Hoard

Usage notes

Text selection

To select and copy text use the terminal-specific modifier key (on Linux this is usually the Shift key).

Code Coverage

Pre-requisites

rustup component add llvm-tools-preview
cargo install grcov

Generating Code Coverage

env CARGO_TARGET_DIR=codecov \
    cargo clean
env RUSTFLAGS="-C instrument-coverage" \
    LLVM_PROFILE_FILE="codecov/debug/profraw/musichoard-%p-%m.profraw" \
    CARGO_TARGET_DIR=codecov \
    BEETSDIR=./ \
    cargo test --all-features --all-targets
grcov codecov/debug/profraw \
      --binary-path ./codecov/debug/ \
      --output-types html \
      --source-dir . \
      --ignore-not-existing \
      --ignore "tests/*" \
      --ignore "src/main.rs" \
      --excl-start "GRCOV_EXCL_START|mod tests \{" \
      --excl-stop "GRCOV_EXCL_STOP" \
      --output-path ./codecov/debug/coverage/
xdg-open codecov/debug/coverage/index.html

Note that some changes may not be visible until codecov/debug/coverage is removed and the grcov command is rerun.

For most cases cargo clean can be replaced with rm -rf ./codecov/debug/{coverage,profraw}.