# Nech.PL Audio API — CI. Runs the armada/api test suite on every push/PR that
# touches the service. Hermetic install (requirements-test.txt), no
# system-site-packages — a host python bump can't silently break it.
#
# Gitea Actions (git.plnech.fr). Dormant until an act_runner is registered for
# this repo; the workflow itself is correct and rehearsed locally (67 passed in
# a clean venv, 2026-06-28).
name: api-ci

on:
  push:
    paths:
      - 'armada/api/**'
      - '.gitea/workflows/api-ci.yml'
  pull_request:
    paths:
      - 'armada/api/**'
      - '.gitea/workflows/api-ci.yml'

jobs:
  test:
    runs-on: ubuntu-latest
    defaults:
      run:
        working-directory: armada/api
    steps:
      - uses: actions/checkout@v4

      - uses: actions/setup-python@v5
        with:
          python-version: '3.12'

      - name: Install test deps (hermetic)
        run: |
          python -m pip install --upgrade pip
          pip install -r requirements-test.txt

      - name: Run test suite
        run: python -m pytest -q
