name: Run Python Tests

on:
  pull_request:
    branches: [ master ]
    paths:
      - 'media_manager/**'
      - 'alembic/**'
      - 'alembic.ini'
      - 'pyproject.toml'
      - 'uv.lock'
      - '.github/workflows/python-tests.yml'
      - 'tests/**'
  workflow_dispatch:

jobs:
  run-tests:
    name: Run Python Tests
    runs-on: ubuntu-latest

    steps:
      - uses: actions/checkout@v4

      - name: Install uv
        uses: astral-sh/setup-uv@v5

      - name: Install the project
        run: uv sync --locked --all-extras --dev

      - name: Run tests
        run: uv run pytest tests