name: CI

on:
  push:
    branches: [main]
  pull_request:

jobs:
  test:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - name: Install Rust
        run: |
          rustup toolchain install stable --profile minimal
          rustup default stable
      - name: Check formatting
        run: cargo fmt --check
      - name: Test
        run: cargo test --locked
