name: Test
on:
  push:
    branches:
      - "main"
  pull_request:
jobs:
  test:
    strategy:
      fail-fast: false
      matrix:
        os:
          - ubuntu-24.04
          - windows-2025
          - macos-15
    env:
      CARGO_TERM_COLOR: always
    runs-on: ${{ matrix.os }}
    steps:
      - uses: actions/checkout@v6
      - uses: Swatinem/rust-cache@v2
      - uses: taiki-e/install-action@v2
        with:
          tool: nextest
      - run: cargo fmt -- --check && cargo clippy --all-targets --all-features -- -D warnings
      - run: cargo nextest run
