name: Codespell

on:
  workflow_call:

jobs:
  codespell:
    name: Check Spelling
    runs-on: ubuntu-slim

    env:
      MISE_PROFILE: cicd

    steps:
      - name: Checkout code
        uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6

      - name: Use mise to install dependencies
        uses: jdx/mise-action@c1ecc8f748cd28cdeabf76dab3cccde4ce692fe4 # v4.0.0
        with:
          version: 2026.1.9
        env:
          # Adding token here to reduce the likelihood of hitting rate limit issues.
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

      - name: Run codespell
        run: codespell
