name: CI

on:
  push:
    branches:
      - main
  pull_request:

jobs:
  check:
    strategy:
      fail-fast: false
      matrix:
        os:
          - ubuntu-latest
          - macos-latest

    runs-on: ${{ matrix.os }}
    steps:
      - uses: actions/checkout@v6
      - uses: dtolnay/rust-toolchain@stable
        with:
          components: clippy, rustfmt
      - uses: taiki-e/install-action@just
      - uses: Swatinem/rust-cache@v2
      - run: just check
