name: CI

on:
  push:
    branches: [main]
  pull_request:
  workflow_dispatch:

jobs:
  build-test:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout repository
        uses: actions/checkout@v6

      - name: Install Rust
        uses: dtolnay/rust-toolchain@stable

      - name: Install just
        uses: taiki-e/install-action@just

      - name: Run linters
        run: just lint

      - name: Run tests
        run: just test

      - name: Build
        run: just build
