name: tests

on:
  pull_request:
  push:
    branches: [ main, develop ]

jobs:
  unit:
    name: Unit tests (Linux, Python 3.11)
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v5
      - uses: actions/setup-python@v6
        with:
          python-version: '3.11'
          cache: pip
          cache-dependency-path: requirements.txt
      - name: Install system dependencies
        run: sudo apt-get update && sudo apt-get install -y portaudio19-dev libegl1 libxkbcommon0
      - name: Install deps
        run: |
          python -m pip install --upgrade pip
          python -m pip install -r requirements.txt
      - name: Run unit tests
        run: |
          python -m pytest -q -m unit

