name: CI
on:
pull_request:
push:
branches:
- main
workflow_dispatch:
permissions:
contents: read
jobs:
quality:
name: Format, lint, and test
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v6
with:
persist-credentials: false
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt, clippy
- name: Check formatting
run: cargo fmt --all -- --check
- name: Lint
run: cargo clippy --all-targets --locked -- -D warnings
- name: Test
run: cargo test --locked