Skip to content

Enhance pet clustering and identity workflows with error handling #236

Enhance pet clustering and identity workflows with error handling

Enhance pet clustering and identity workflows with error handling #236

Workflow file for this run

name: Tests
on:
workflow_dispatch:
push:
branches: [main, edit-base]
pull_request:
branches: [main, edit-base]
permissions:
contents: read
jobs:
pets-scale-contract:
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.12"
cache: pip
cache-dependency-path: pyproject.toml
- name: Install Linux system dependencies
run: |
sudo apt-get update
sudo apt-get install -y --no-install-recommends libegl1 libgl1 libxkbcommon0 libpulse0
- name: Install Pets scale-contract dependencies
run: |
python -m pip install --upgrade pip
pip install -e ".[test]" "usearch>=2.26,<3"
- name: Run 50k incremental index contract
env:
IPHOTO_RUN_PETS_SCALE_CONTRACT: "1"
QT_QPA_PLATFORM: offscreen
NUMBA_DISABLE_JIT: "1"
run: python -m pytest -q tests/contracts/test_pets_scale_contract.py
pets-production-shape-contract:
if: github.event_name == 'workflow_dispatch' || github.event_name == 'pull_request'
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.os }}
timeout-minutes: 30
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.12"
cache: pip
cache-dependency-path: pyproject.toml
- name: Install Linux system dependencies
if: runner.os == 'Linux'
run: |
sudo apt-get update
sudo apt-get install -y --no-install-recommends libegl1 libgl1 libxkbcommon0 libpulse0
- name: Install production-shape dependencies
run: |
python -m pip install --upgrade pip
pip install -e ".[test]" "usearch>=2.26,<3"
- name: Run 384-dimensional USearch and fallback contracts
env:
IPHOTO_RUN_PETS_PRODUCTION_SHAPE_CONTRACT: "1"
QT_QPA_PLATFORM: offscreen
NUMBA_DISABLE_JIT: "1"
run: python -m pytest -q -s tests/contracts/test_pets_scale_contract.py
pets-model-contract:
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.12"
cache: pip
cache-dependency-path: pyproject.toml
- name: Install Linux system dependencies
run: |
sudo apt-get update
sudo apt-get install -y --no-install-recommends libegl1 libgl1 libxkbcommon0 libpulse0
- uses: actions/cache@v4
with:
path: ~/.cache/iphoto-contracts
key: pets-yolox-c789161ed43c8269-dog-5a9522051c3cec2b
- name: Install Pets model-contract dependencies
run: |
python -m pip install --upgrade pip
pip install -e ".[test]" onnxruntime
- name: Run official YOLOX contract
env:
IPHOTO_RUN_PETS_MODEL_CONTRACT: "1"
QT_QPA_PLATFORM: offscreen
run: python -m pytest -q tests/contracts/test_pets_model_contract.py
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.12"
cache: "pip"
cache-dependency-path: |
pyproject.toml
- name: Install system dependencies
run: |
sudo apt-get update
sudo apt-get install -y --no-install-recommends \
libegl1 libgl1 libxkbcommon0 libpulse0
- name: Install Python dependencies
run: |
python -m pip install --upgrade pip
pip install -e ".[test]"
- name: Run tests
env:
QT_QPA_PLATFORM: offscreen
NUMBA_DISABLE_JIT: "1"
run: |
python tools/check_architecture.py
python -m compileall -q src tools
python tools/run_pytest_ci.py tests/ --tb=short -v
git diff --check
startup-contracts:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.os }}
timeout-minutes: 20
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.12"
cache: pip
cache-dependency-path: pyproject.toml
- name: Install Linux system dependencies
if: runner.os == 'Linux'
run: |
sudo apt-get update
sudo apt-get install -y --no-install-recommends libegl1 libgl1 libxkbcommon0 libpulse0
- name: Install Python dependencies
run: |
python -m pip install --upgrade pip
pip install -e ".[test]"
- name: Run startup contracts with normal interpreter shutdown
env:
QT_QPA_PLATFORM: offscreen
NUMBA_DISABLE_JIT: "1"
run: >-
python -m pytest -q
tests/application/test_bootstrap_settings.py
tests/application/test_library_probe.py
tests/application/test_library_session.py
tests/application/test_runtime_context.py
tests/gui/test_main.py
tests/gui/test_startup_orchestrator.py
tests/gui/test_gui_startup_job_queue.py
tests/gui/test_startup_shutdown_smoke.py
tests/test_library_bind_double_scan.py
tests/test_startup_benchmark.py
tests/test_startup_profile.py
tests/test_appimage_packaging.py
tests/test_macos_detection_report.py
detail-core-contracts:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.os }}
timeout-minutes: 20
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.12"
cache: pip
cache-dependency-path: pyproject.toml
- name: Install Linux system dependencies
if: runner.os == 'Linux'
run: |
sudo apt-get update
sudo apt-get install -y --no-install-recommends libegl1 libgl1 libxkbcommon0 libpulse0
- name: Install Python dependencies
run: |
python -m pip install --upgrade pip
pip install -e ".[test]"
- name: Run Detail core contracts
env:
QT_QPA_PLATFORM: offscreen
NUMBA_DISABLE_JIT: "1"
run: >-
python -m pytest -q
tests/gui/test_detail_profile.py
tests/gui/test_detail_pipeline.py
tests/gui/test_detail_request_scheduler.py
tests/gui/test_detail_decode_backend.py
tests/gui/test_detail_surface_cache.py
tests/gui/test_detail_render_coordinator.py
live-photo-contracts:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.os }}
timeout-minutes: 20
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.12"
cache: pip
cache-dependency-path: pyproject.toml
- name: Install Linux system dependencies
if: runner.os == 'Linux'
run: |
sudo apt-get update
sudo apt-get install -y --no-install-recommends libegl1 libgl1 libxkbcommon0 libpulse0
- name: Install Python dependencies
run: |
python -m pip install --upgrade pip
pip install -e ".[test]"
- name: Run Live Photo lifecycle contracts
env:
QT_QPA_PLATFORM: offscreen
NUMBA_DISABLE_JIT: "1"
run: >-
python -m pytest -q
tests/gui/test_detail_render_coordinator.py
tests/gui/coordinators/test_playback_coordinator.py
tests/ui/controllers/test_player_view_controller_adjustments.py
tests/ui/controllers/test_player_view_init_cover.py
tests/ui/widgets/test_gl_image_viewer_post_load_signal.py
tests/ui/widgets/test_video_area.py
detail-edit-library-contracts:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.os }}
timeout-minutes: 20
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.12"
cache: pip
cache-dependency-path: pyproject.toml
- name: Install Linux system dependencies
if: runner.os == 'Linux'
run: |
sudo apt-get update
sudo apt-get install -y --no-install-recommends libegl1 libgl1 libxkbcommon0 libpulse0
- name: Install Python dependencies
run: |
python -m pip install --upgrade pip
pip install -e ".[test]"
- name: Run Detail/Edit/Library lifecycle contracts
env:
QT_QPA_PLATFORM: offscreen
NUMBA_DISABLE_JIT: "1"
run: >-
python -m pytest -q
tests/gui/test_detail_render_session.py
tests/gui/test_detail_pipeline.py
tests/application/test_dialog_controller_runtime_binding.py
tests/application/test_runtime_context.py
tests/gui/coordinators/test_main_coordinator_asset_runtime_boundary.py
tests/gui/coordinators/test_main_coordinator_pending_moves.py
tests/gui/coordinators/test_edit_coordinator.py
tests/gui/coordinators/test_playback_coordinator.py
tests/ui/controllers/test_player_view_controller_adjustments.py
tests/ui/controllers/test_player_view_init_cover.py
tests/ui/test_window_manager_geometry.py
recognition-contracts:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.os }}
timeout-minutes: 20
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.12"
cache: pip
cache-dependency-path: pyproject.toml
- name: Install Linux system dependencies
if: runner.os == 'Linux'
run: |
sudo apt-get update
sudo apt-get install -y --no-install-recommends libegl1 libgl1 libxkbcommon0 libpulse0
- name: Install Python dependencies
run: |
python -m pip install --upgrade pip
pip install -e ".[test]"
- name: Run Recognition recovery and concurrency contracts
env:
QT_QPA_PLATFORM: offscreen
NUMBA_DISABLE_JIT: "1"
run: >-
python -m pytest -q
tests/test_recognition_operation_journal.py