Skip to content

Test CI

Test CI #2

Workflow file for this run

name: Lint
on:
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
push:
branches:
- master
permissions:
contents: read
jobs:
rust-lint:
name: Rustfmt + Clippy
runs-on: ubuntu-latest
if: github.event.pull_request.draft == false || github.event_name != 'pull_request'
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install Rust (stable) with components
uses: dtolnay/rust-toolchain@stable
with:
components: clippy, rustfmt
- name: Cache cargo registry and build
uses: Swatinem/rust-cache@v2
- name: rustfmt check
run: cargo fmt --all -- --check
- name: clippy (deny warnings)
run: |
cargo clippy --all-targets --all-features -- -D warnings