mirror of
https://github.com/wiltodelta/remove-ai-watermarks.git
synced 2026-10-15 22:10:45 +02:00
The video full-clip job needs ffmpeg from Ubuntu's own repositories, but its apt-get update refreshed every source on the runner image, so a broken third-party index failed the job twice on 2026-09-09: google-chrome.list served a Hash Sum mismatch (bc1428ab... against 233e56de...) and both the run and its rerun died at Install ffmpeg with ten otherwise-green jobs around them. Remove every non-Ubuntu source definition from /etc/apt/sources.list.d before updating, so no vendor's broken index can fail a step that never needed it. The only apt-get in the workflows. pre-commit: 1) maintain.sh - exit 2 at the uv-secure gate, the three triaged no-fix advisories in docs/development.md (rechecked 2026-09-09 against PyPI); ruff check+format clean, pyright src/ 0 errors, 2368 passed 3 skipped run separately, same gate run as the preceding commit with no post-gate edit between them; 2) /simplify - single pass, no fan-out available, no findings; 3) docs sync - grepped apt-get/google-chrome/Install ffmpeg across docs/, README, .claude/rules/, tests/: no other references, the rationale lives in the step's comment; 4) CLAUDE.md - audited against the structure rule, no additions, revise-claude-md: no additions
113 lines
3.5 KiB
YAML
113 lines
3.5 KiB
YAML
name: Tests
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
pull_request:
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
concurrency:
|
|
group: tests-${{ github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
lint:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v7
|
|
- uses: astral-sh/setup-uv@v7
|
|
- name: Sync dev environment
|
|
run: uv sync --frozen --extra dev
|
|
- name: Check C2PA soft-binding registry snapshot
|
|
run: uv run python scripts/sync_c2pa_soft_bindings.py --check
|
|
- name: Ruff lint
|
|
run: uv run ruff check
|
|
- name: Ruff format check
|
|
run: uv run ruff format --check
|
|
|
|
test:
|
|
name: test ${{ matrix.os }} py${{ matrix.python-version }}
|
|
runs-on: ${{ matrix.os }}
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
# Exercise every supported minor. The floor and latest minor run on all
|
|
# operating systems; intermediate minors run on Linux to bound the
|
|
# matrix without leaving a declared Python version untested.
|
|
include:
|
|
- os: ubuntu-latest
|
|
python-version: "3.11"
|
|
- os: macos-latest
|
|
python-version: "3.11"
|
|
- os: windows-latest
|
|
python-version: "3.11"
|
|
- os: ubuntu-latest
|
|
python-version: "3.12"
|
|
- os: ubuntu-latest
|
|
python-version: "3.13"
|
|
- os: ubuntu-latest
|
|
python-version: "3.14"
|
|
- os: macos-latest
|
|
python-version: "3.14"
|
|
- os: windows-latest
|
|
python-version: "3.14"
|
|
steps:
|
|
- uses: actions/checkout@v7
|
|
- uses: astral-sh/setup-uv@v7
|
|
with:
|
|
python-version: ${{ matrix.python-version }}
|
|
- name: Sync dev environment
|
|
run: uv sync --frozen --extra dev
|
|
- name: Run tests
|
|
run: uv run pytest -q
|
|
|
|
transport-contract-python-314:
|
|
name: versioned transport contracts py3.14
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v7
|
|
- uses: astral-sh/setup-uv@v7
|
|
with:
|
|
python-version: "3.14"
|
|
- name: Create clean runtime contract environment
|
|
run: uv venv --python 3.14 .venv-contract
|
|
- name: Install runtime contract dependencies
|
|
run: >-
|
|
uv pip install --python .venv-contract/bin/python
|
|
".[pixels,heif]" "numpy>=2,<3" "pytest>=8"
|
|
- name: Run versioned transport contract tests
|
|
run: >-
|
|
.venv-contract/bin/python -m pytest -q
|
|
tests/test_forensic_metadata.py
|
|
tests/test_metadata_record.py
|
|
tests/test_pixel_evidence.py
|
|
|
|
video-e2e:
|
|
name: video full-clip end-to-end
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 5
|
|
steps:
|
|
- uses: actions/checkout@v7
|
|
- uses: astral-sh/setup-uv@v7
|
|
with:
|
|
python-version: "3.12"
|
|
- name: Install ffmpeg
|
|
# Third-party apt sources baked into the runner image (google-chrome et
|
|
# al.) can publish a broken index and fail `apt-get update`, while this
|
|
# job only needs ffmpeg from Ubuntu's own repositories: drop every
|
|
# non-Ubuntu source definition before updating.
|
|
run: |
|
|
sudo find /etc/apt/sources.list.d -mindepth 1 -maxdepth 1 \
|
|
! -name 'ubuntu.sources' -delete
|
|
sudo apt-get update
|
|
sudo apt-get install --yes ffmpeg
|
|
- name: Sync dev environment
|
|
run: uv sync --frozen --extra dev
|
|
- name: Run full-clip video test
|
|
run: >-
|
|
uv run pytest -vv -o faulthandler_timeout=60
|
|
tests/test_video.py::TestVideoVisibleFullClip
|
|
tests/test_video_fidelity_probe.py
|