name: Cargo CI on: push: branches: [ main ] pull_request: branches: [ main ] env: BEETSDIR: ./ CARGO_TERM_COLOR: always LLVM_PROFILE_FILE: target/debug/profraw/musichoard-%p-%m.profraw RUSTFLAGS: -C instrument-coverage jobs: build_and_test: name: Build and Test container: docker.io/drrobot/musichoard-ci:rust-1.75 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: >- grcov target/debug/profraw --binary-path ./target/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 ./target/debug/coverage/ - run: >- python3 .gitea/scripts/coverage.py --coverage-file ./target/debug/coverage/coverage.json --fail-under 100.00 lint: name: Lint 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