name: fmt
on:
push:
branches:
pull_request:
branches:
# Cancel superseded runs on the same ref to save CI minutes.
concurrency:
group: fmt-${{ github.ref }}
cancel-in-progress: true
jobs:
fmt:
name: cargo fmt
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt
- name: Check formatting
run: cargo fmt --all -- --check