jobs:
  test:
    env:
      GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}'
    runs-on: 'ubuntu-latest'
    steps:
      - uses: 'actions/checkout@v6'
      - name: 'Install uv'
        uses: 'astral-sh/setup-uv@v7'
      - name: 'Set up Python ${{ matrix.python-version }}'
        uses: 'actions/setup-python@v6'
        with:
          python-version: '${{ matrix.python-version }}'
      - name: 'Install dependencies (uv)'
        run: 'uv sync --group tests --all-extras'
      - name: 'Install pytest-action dependencies'
        run: 'uv pip install pytest-md pytest-emoji'
      - name: 'Install dependencies (Yarn)'
        run: 'yarn'
      - name: 'Run tests'
        uses: 'pavelzw/pytest-action@v2'
        with:
          click-to-expand: true
          custom-arguments: '--cov . --cov-branch --cov-report term-missing:skip-covered --cov-report xml'
          custom-pytest: 'yarn test'
          emoji: true
          job-summary: true
          report-title: 'Test Report'
          verbose: true
      - name: 'Coverage'
        uses: 'coverallsapp/github-action@v2'
        with:
          file: 'coverage.xml'
    strategy:
      matrix:
        python-version:
          - '3.10'
          - '3.11'
          - '3.12'
          - '3.13'
          - '3.14'
name: 'Tests'
'on':
  pull_request:
    branches:
      - 'master'
    paths:
      - '**/*.py'
      - '**/*.pyi'
      - '.github/workflows/tests.yml'
      - 'pyproject.toml'
      - 'uv.lock'
      - 'poetry.lock'
      - 'tests/**'
  push:
    branches:
      - 'master'
    paths:
      - '**/*.py'
      - '**/*.pyi'
      - '.github/workflows/tests.yml'
      - 'pyproject.toml'
      - 'uv.lock'
      - 'poetry.lock'
      - 'tests/**'
permissions:
  contents: 'read'
