name: CI
on:
pull_request:
push:
branches:
- main
permissions:
contents: read
jobs:
rust:
name: Rust checks
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt, clippy
- name: Cache cargo artifacts
uses: Swatinem/rust-cache@v2
- name: Check formatting
run: cargo fmt --all -- --check
- name: Lint with clippy
run: cargo clippy --all-targets --all-features -- -D warnings
- name: Run unit and integration tests
run: cargo test --all-targets --all-features