name: clippy
on: [push, pull_request]
env:
CARGO_TERM_COLOR: always
jobs:
warnings:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Set up Rust toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
components: clippy
- name: Set up cargo cache
uses: actions/cache@v3
with:
path: ~/.cargo/registry
key: cargo-${{ hashFiles('Cargo.lock') }}
restore-keys: |
cargo-
- name: Run Clippy
uses: actions-rs/cargo@v1
with:
command: clippy
args: -- -D warnings