---
name: Codespell

on:
  push:
    branches: [main]
  pull_request:
    types:
    - opened
    - reopened
    - synchronize
    - ready_for_review

permissions:
  contents: read

jobs:
  codespell:
    name: Check for spelling errors
    runs-on: ubuntu-latest

    steps:
      - name: Checkout
        uses: actions/checkout@v4
      - name: Set up Python
        uses: actions/setup-python@v5
        with:
          python-version: '3.11'
      - name: Install uv
        uses: astral-sh/setup-uv@v3
      - name: Run codespell via Makefile
        run: make spell