name: CI

on:
  push:
    branches: ["**"]
  pull_request:

env:
  QT_QPA_PLATFORM: offscreen

jobs:
  preflight:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4

      - name: Install Qt runtime libs
        run: sudo apt-get update && sudo apt-get install -y libegl1 libgl1 libxkbcommon0 libfontconfig1 libdbus-1-3

      - name: Install uv
        uses: astral-sh/setup-uv@v3
        with:
          python-version: "3.11"

      - name: Install dependencies
        run: uv sync

      - name: Lint
        run: make lint

      - name: Typecheck
        run: make typecheck

      - name: Test
        run: make test
