name: Check
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
permissions:
contents: read
jobs:
check:
strategy:
matrix:
toolchain: [stable, beta]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Install Rust
env:
TOOLCHAIN: ${{ matrix.toolchain }}
run: |
rustup install "${TOOLCHAIN}" --profile minimal --component rustfmt,clippy
rustup default "${TOOLCHAIN}"
- name: Format
run: |
cargo fmt --check
- name: Clippy
run: |
cargo clippy --locked --all-features --all-targets