name: test

on:
  push:
    branches:
      - main

  pull_request:
    branches:
      - "**"

jobs:
  test:
    strategy:
      matrix:
        os: [ubuntu, macos, windows]

    runs-on: ${{ matrix.os }}-latest

    steps:
      - name: Checkout
        uses: actions/checkout@v7

      - name: Setup Rust
        uses: dtolnay/rust-toolchain@stable

      - name: Run clippy
        run: cargo clippy --workspace

      - name: Run tests
        run: cargo test --workspace
