---
name: Typing

# yamllint disable-line rule:truthy
on:
  push:
  pull_request:
  workflow_dispatch:

env:
  DEFAULT_PYTHON: "3.11"

jobs:
  mypy:
    name: mypy
    runs-on: ubuntu-latest
    steps:
      - name: ⤵️ Check out code from GitHub
        uses: actions/checkout@v4.2.2
      - name: 🏗 Set up uv
        uses: astral-sh/setup-uv@v5.2.1
        with:
          enable-cache: true
          python-version: ${{ env.DEFAULT_PYTHON }}
      - name: 🏗 Install dependencies
        run: uv sync --extra cli --frozen --dev
      - name: 🚀 Run mypy
        run: uv run mypy examples src tests
