name: ci
on:
push:
branches: [main, master]
pull_request:
jobs:
build-test:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt, clippy
- name: cargo fmt --check
run: cargo fmt --all --check
- name: cargo clippy
run: cargo clippy --all-targets -- -D warnings
- name: cargo doc
env:
RUSTDOCFLAGS: -D warnings
run: cargo doc --no-deps
- name: cargo build --release --locked
run: cargo build --release --locked --verbose
- name: cargo test
run: cargo test --verbose