Files
jellyfin-scene-search/.github/workflows/caption-index-tests.yml
T

87 lines
3.8 KiB
YAML

name: Caption index regression tests
on:
pull_request:
paths:
- "scene_search/meili.py"
- "scene_search/search_service.py"
- "scene_search/sync.py"
- "scene_search/captioner.py"
- "scene_search/caption_text.py"
- "scene_search/caption_cleanup.py"
- "scene_search/prompts/caption.txt"
- "scene_search/prompts/caption_specialist.txt"
- "scene_search/prompts/compare_qwen3.txt"
- "scene_search/caption_editor.py"
- "scene_search/cli.py"
- "scene_search/overviews.py"
- "scene_search/overview_prompts.py"
- "scene_search/prompts/overview.txt"
- "scene_search/prompts/overview_specialist.txt"
- "scene_search/overview_jobs.py"
- "scene_search/api.py"
- "scene_search/web/overviews.html"
- "scene_search/web/captions.html"
- "scene_search/web/index.html"
- "scene_search/jellyfin.py"
- "tests/test_jellyfin.py"
- "scene_search/config.py"
- "scene_search/database.py"
- "tests/test_overviews.py"
- "tests/test_overview_prompts.py"
- "tests/test_caption_editor.py"
- "tests/test_caption_text.py"
- "tests/test_caption_cleanup.py"
- "tests/test_overview_jobs.py"
- ".env.example"
- "tests/test_meili.py"
- "tests/test_search_service.py"
- "tests/test_incremental_caption_sync.py"
- ".github/workflows/caption-index-tests.yml"
workflow_dispatch:
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Install lightweight dependencies
run: pip install numpy requests python-dotenv pillow
- name: Test blended caption and visual search ranking
run: python -m unittest discover -s tests -p "test_search_service.py" -v
- name: Test Meilisearch document methods and caption repair
run: python -m unittest discover -s tests -p "test_meili.py" -v && python -m unittest discover -s tests -p "test_incremental_caption_sync.py" -v
- name: Test Jellyfin API metadata-read path
run: python -m unittest discover -s tests -p "test_jellyfin.py" -v
- name: Test Jellyfin AI overview publishing safeguards
run: python -m unittest discover -s tests -p "test_overviews.py" -v
- name: Test editable Overview prompt loading and cache invalidation
run: python -m unittest discover -s tests -p "test_overview_prompts.py" -v
- name: Test Overview background job controls
run: python -m unittest discover -s tests -p "test_overview_jobs.py" -v
- name: Test caption prompt preface handling and existing caption cleanup
run: python -m unittest discover -s tests -p "test_caption_text.py" -v && python -m unittest discover -s tests -p "test_caption_cleanup.py" -v
- name: Test saved caption editing and targeted search sync
run: python -m unittest discover -s tests -p "test_caption_editor.py" -v
- name: Check Overview Sync browser JavaScript syntax
run: |
python - <<'PY'
from pathlib import Path
page = Path("scene_search/web/overviews.html").read_text()
script = page.split("<script>", 1)[1].split("</script>", 1)[0]
Path("/tmp/jellyfin-overviews.js").write_text(script)
PY
node --check /tmp/jellyfin-overviews.js
python - <<'PY'
from pathlib import Path
page = Path("scene_search/web/captions.html").read_text()
script = page.split("<script>", 1)[1].split("</script>", 1)[0]
Path("/tmp/jellyfin-captions.js").write_text(script)
PY
node --check /tmp/jellyfin-captions.js
- name: Check module syntax
run: python -m compileall -q scene_search tests