Skip to content

Fix lints

Fix lints #4

Workflow file for this run

name: Tests
on:
push:
branches:
- main
pull_request: {}
jobs:
test:
name: "Tests"
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup build cache
uses: actions/cache@v4
with:
path: |
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- name: Setup buildx
uses: docker/setup-buildx-action@v1
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
- name: Cargo check
run: cargo check --all-features
- name: Run tests
run: cargo test
lint:
name: "Lints"
runs-on: ubuntu-latest
if: ${{ github.triggering_actor != 'dependabot[bot]' }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Restore build cache
uses: actions/cache/restore@v4
with:
path: |
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- name: Install Rust
uses: dtolnay/rust-toolchain@nightly
with:
components: rustfmt, clippy
- name: Clippy
run: cargo clippy --all-features -- --deny "warnings"
- name: Rustfmt
run: cargo fmt --check
- name: Check for unused dependencies
uses: bnjbvr/cargo-machete@main