---
name: Typing

# yamllint disable-line rule:truthy
on:
  push:
    branches: [main]
  pull_request:
    branches: [main]
  workflow_dispatch:

env:
  DEFAULT_PYTHON: "3.13"

jobs:
  ty:
    name: ty
    runs-on: ubuntu-latest
    permissions:
      contents: read
    steps:
      - name: ⤵️ Check out code from GitHub
        uses: actions/checkout@v6.0.1
      - name: 🏗 Set up uv
        uses: astral-sh/setup-uv@v7
        with:
          enable-cache: true
      - name: 🏗 Set up Python ${{ env.DEFAULT_PYTHON }}
        id: python
        uses: actions/setup-python@v6.1.0
        with:
          python-version: ${{ env.DEFAULT_PYTHON }}
      - name: 🏗 Install dependencies
        run: uv sync --dev
      - name: 🚀 Run ty
        run: uv run ty check examples src tests
