name: CI

on:
  push:
    branches: [main]
  pull_request:
    branches: [main]

jobs:
  test:
    strategy:
      fail-fast: false
      matrix:
        os: [ubuntu-latest, macos-latest, windows-latest]
    runs-on: ${{ matrix.os }}
    steps:
      - uses: actions/checkout@v4
        with:
          fetch-depth: 0
      - uses: dtolnay/rust-toolchain@1.88.0
        with:
          components: clippy, rustfmt
      - run: cargo build --all-targets
      - run: cargo test --all
      - run: cargo clippy --all-targets -- -D warnings
      - run: cargo fmt --all -- --check
