name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
ci:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-latest, ubuntu-latest, windows-latest]
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- uses: taiki-e/install-action@cargo-make
- uses: Swatinem/rust-cache@v2
- name: Cargo check
run: cargo check --locked --workspace --examples --tests
- name: Cargo test
run: cargo test --locked --workspace
- name: Clippy check
run: cargo clippy --workspace --all-targets --lib --bins --tests --benches --examples
- name: "Cargo fmt"
run: cargo make format-check
- name: Docs
env:
RUSTDOCFLAGS: --cfg docsrs
run: cargo doc --workspace --all-features --no-deps --document-private-items