name: test
on:
  push:
    branches:
      - master
  pull_request:
jobs:
  test:
    strategy:
      fail-fast: false
      matrix:
        os:
          - ubuntu-latest
          - macos-14
    runs-on: ${{ matrix.os }}
    steps:
      - uses: actions/checkout@v4
      - uses: Swatinem/rust-cache@v2
      - uses: Homebrew/actions/setup-homebrew@master
      - run: tools/setup.sh
      - run: cargo test
  lint:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: Swatinem/rust-cache@v2
      - uses: Homebrew/actions/setup-homebrew@master
      - run: tools/setup.sh
      - run: cargo clippy -- -D warnings
  format:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - run: cargo fmt --check
