name: ci
on:
push:
branches:
pull_request:
permissions:
contents: read
jobs:
ci:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- name: Install Rust (stable, with fmt + clippy)
uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt, clippy
- name: Cache cargo registry and target
uses: Swatinem/rust-cache@v2
- name: rustfmt
run: cargo fmt --all --check
- name: clippy
run: cargo clippy --all-targets -- -D warnings
- name: test
run: cargo test --all