name: Test

on: [push, pull_request]

jobs:
  format-check:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - name: Format check
        run: |
          cargo fmt --check

  clippy:
    strategy:
      matrix:
        runner: [ubuntu-latest, macos-latest, windows-latest]
    runs-on: ${{ matrix.runner }}
    steps:
      - uses: actions/checkout@v4
      - name: Clippy check
        run: |
          cargo clippy --all-features -- --no-deps --deny warnings

  test:
    strategy:
      matrix:
        runner: [ubuntu-latest, macos-latest, windows-latest]
    runs-on: ${{ matrix.runner }}
    steps:
        - uses: actions/checkout@v4
        - name: Run tests
          run: |
              cargo test --all-features
