ci: run cargo-machete to check for unused deps #116
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: CI | |
on: | |
push: | |
branches: [ "master" ] | |
pull_request: | |
branches: [ "master" ] | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Cache | |
uses: actions/[email protected] | |
with: | |
path: | | |
~/.cargo/bin | |
~/.cargo/registry | |
~/.cargo/git | |
target | |
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} | |
- name: Setup | |
run: | | |
rustup component add llvm-tools-preview | |
cargo install --locked cargo-deny || true | |
cargo install --locked grcov || true | |
cargo install --locked cargo-machete || true | |
- name: Build | |
env: | |
CARGO_INCREMENTAL: 0 | |
RUSTFLAGS: '-Cinstrument-coverage' | |
LLVM_PROFILE_FILE: 'cargo-test-%p-%m.profraw' | |
run: ./build.sh | |
- name: Coverage | |
run: grcov . --binary-path ./target/debug/deps/ -s . -t lcov --branch --ignore-not-existing --ignore '../*' --ignore "/*" -o target/tests.lcov | |
- name: Upload coverage reports to Codecov | |
uses: codecov/[email protected] | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
slug: altsem/gitu |