mirror of
https://github.com/guillaumemeyer/watermarks-remover.git
synced 2026-08-22 13:11:57 +02:00
* fix: make subprocess and symlink tests Windows-compatible - Gate preexec_fn (POSIX-only) so optional tools can run on Windows - Skip symlink tests when the platform denies the privilege - Add a Windows CI leg and a Windows CLI smoke run * fix: use UTF-8 stdio and fail Windows smoke on first error - Reconfigure stdin/stdout/stderr to UTF-8 so Windows redirected streams stop raising UnicodeEncodeError on invisible Unicode characters - Chain the Windows smoke commands so a failing script fails the step
44 lines
1.6 KiB
YAML
44 lines
1.6 KiB
YAML
name: CI
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
pull_request:
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
test:
|
|
strategy:
|
|
matrix:
|
|
os: [ubuntu-latest, windows-latest]
|
|
runs-on: ${{ matrix.os }}
|
|
steps:
|
|
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
- uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
|
|
with:
|
|
python-version: "3.12"
|
|
|
|
- name: Install test deps
|
|
run: python -m pip install -r requirements-dev.txt
|
|
|
|
- name: Test
|
|
run: python -m pytest -q
|
|
|
|
- name: Smoke (Windows)
|
|
if: matrix.os == 'windows-latest'
|
|
shell: pwsh
|
|
run: |
|
|
python skills/remove-ai-marks/scripts/clean_text.py tests/fixtures/sample_watermarked.txt -o "$env:TEMP/wm.cleaned.txt" --stats &&
|
|
python skills/remove-ai-marks/scripts/rewrite_text.py tests/fixtures/sample_watermarked.txt --backend print-prompt > $null &&
|
|
python skills/remove-ai-marks/scripts/clean_file.py tests/fixtures/sample_ai.md -o "$env:TEMP/sample_ai.cleaned.md" &&
|
|
python skills/remove-ai-marks/scripts/clean_file.py tests/fixtures/sample_ai.html -o "$env:TEMP/sample_ai.cleaned.html" &&
|
|
python skills/remove-ai-marks/scripts/clean_file.py tests/fixtures/sample_meta.svg -o "$env:TEMP/sample_meta.cleaned.svg"
|
|
|
|
- name: Audit dependencies (pip-audit)
|
|
if: matrix.os == 'ubuntu-latest'
|
|
run: |
|
|
python -m pip_audit -r requirements-dev.txt \
|
|
-r skills/remove-ai-marks/scripts/requirements-synthid-scorer.txt
|