name: Clippy check
permissions:
contents: read
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
env:
RUSTFLAGS: "-Dwarnings"
jobs:
clippy_check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Install minimal stable with clippy and rustfmt
uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
components: rustfmt, clippy
- uses: Swatinem/rust-cache@v2.8.2
- name: Run Clippy
run: cargo clippy --color always --all-targets --all-features
- name: Run fmt check
run: cargo fmt --all --check -- --color=always