mirror of
https://github.com/wiltodelta/remove-ai-watermarks.git
synced 2026-06-05 02:28:00 +02:00
a46268f6eb
* Add cross-platform CI test matrix, PyPI classifiers CI: new test.yml runs lint (ubuntu) + a test matrix (ubuntu/macos/windows x py3.10/3.12, core+dev, GPU tests skip) on push to main and PRs, closing the gap where only the release publish.yml ran (ubuntu, no tests). Add PyPI classifiers (OS/Python/topic). README Tests badge, CLAUDE.md CI note. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * Make availability tests reflect installed deps, not assume gpu extra The new core+dev CI matrix has no diffusers, so the invisible-engine availability tests (asserting is_available() is True unconditionally) and the two mocked invisible CLI tests (whose command gates on is_available before the mock) failed. Assert availability == actual importability of torch+diffusers, and patch the CLI availability gate so the mocked-engine tests run regardless of the gpu extra. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
47 lines
1.3 KiB
YAML
47 lines
1.3 KiB
YAML
name: Tests
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
pull_request:
|
|
|
|
concurrency:
|
|
group: tests-${{ github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
lint:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v6
|
|
- uses: astral-sh/setup-uv@v7
|
|
- name: Sync dev environment
|
|
run: uv sync --frozen --extra dev
|
|
- 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:
|
|
# Cross-OS x Python-floor/recent. The default-install surface only
|
|
# needs the core deps plus dev tooling (no GPU extra): the model-running
|
|
# paths are availability-gated and skip when torch/diffusers are absent,
|
|
# so this matrix exercises metadata, identify, visible, and the cv2
|
|
# eraser on every OS without pulling the heavy ML stack.
|
|
os: [ubuntu-latest, macos-latest, windows-latest]
|
|
python-version: ["3.10", "3.12"]
|
|
steps:
|
|
- uses: actions/checkout@v6
|
|
- 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
|