name: CI

on:
  push:
    branches: [ main ]
  pull_request:

jobs:
  lint-and-test:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3
      - uses: actions/setup-python@v4
        with:
          python-version: '3.11'
      - name: Install dependencies
        run: |
          python -m pip install --upgrade pip
          pip install .[all]
          pip install ruff==0.11.10 pyright==1.1.327
      - name: Run linters
        run: |
          ruff check .
          pyright $(git ls-files '*.py')
      - name: Run tests
        run: pytest -vv
