name: Lint

on:
  push:
    branches: [master]
  pull_request:
    branches: [master]

permissions:
  contents: read

jobs:
  lint:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v6

      - name: Install uv with python version.
        uses: astral-sh/setup-uv@v7
        with:
          python-version: "3.13"
          enable-cache: true
          cache-dependency-glob: "uv.lock"

      - name: Install dependencies
        run: |
          uv sync --upgrade

      - name: ruff
        run: |
          uv run ruff check .
          uv run ruff format --check .

      - name: pyright
        run: uv run pyright src
