name: CI

on:
  push:
    branches: [ master ]
  pull_request:
    branches: [ master ]

jobs:
  test:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v4
    - name: Install Rust
      uses: dtolnay/rust-toolchain@stable
    - name: Check format
      run: cargo fmt --all -- --check
    - name: Check clippy
      run: cargo clippy -- -D warnings
    - name: Run tests
      run: cargo test
    - name: Run benches
      run: cargo bench -- --test