name: clippy
on:
push:
branches:
pull_request:
branches:
# Cancel superseded runs on the same ref to save CI minutes.
concurrency:
group: clippy-${{ github.ref }}
cancel-in-progress: true
env:
CARGO_TERM_COLOR: always
jobs:
clippy:
name: cargo clippy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
with:
components: clippy
- name: Cache cargo artifacts
uses: Swatinem/rust-cache@v2
- name: Run clippy
run: cargo clippy --all-features --all-targets -- -D warnings