Files
SnapOtter/.github/workflows/ci.yml
T
SnapOtter c0550fb2cf fix(ci): ignore 3 new Pillow CVEs blocked by ML dependency constraints
Pillow 11.1.0 has CVE-2026-42308, CVE-2026-42310, CVE-2026-42311
(fixed in 12.2.0). Upgrading to Pillow 12.x requires validating
compatibility with rembg, realesrgan, mediapipe, and codeformer.
2026-05-06 10:40:30 +08:00

110 lines
2.9 KiB
YAML

name: CI
on:
workflow_dispatch:
push:
branches: [main]
paths-ignore:
- "README.md"
- "CONTRIBUTING.md"
- "images/**"
- "apps/docs/**"
- "apps/landing/**"
- "docs/**"
pull_request:
branches: [main]
paths-ignore:
- "README.md"
- "CONTRIBUTING.md"
- "images/**"
- "apps/docs/**"
- "apps/landing/**"
- "docs/**"
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/setup
- run: pnpm lint
typecheck:
name: Typecheck
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/setup
- run: pnpm typecheck
test:
name: Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install system dependencies (HEIC + ExifTool)
run: sudo apt-get update -qq && sudo apt-get install -y --no-install-recommends libheif-examples libheif-plugin-x265 libheif-plugin-libde265 libimage-exiftool-perl
- uses: ./.github/actions/setup
- run: pnpm test:ci
pip-audit:
name: Python Dependency Audit
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.11"
- run: pip install pip-audit
- name: Run pip-audit (ignoring CVEs blocked by dependency constraints)
run: >-
pip-audit -r packages/ai/python/requirements.txt
--ignore-vuln CVE-2024-27763
--ignore-vuln CVE-2026-40086
--ignore-vuln CVE-2026-25990
--ignore-vuln CVE-2026-40192
--ignore-vuln GHSA-55v6-g8pm-pw4c
--ignore-vuln CVE-2026-42308
--ignore-vuln CVE-2026-42310
--ignore-vuln CVE-2026-42311
build:
name: Build
runs-on: ubuntu-latest
needs: [lint, typecheck, test]
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/setup
- run: pnpm build
# docker:
# name: Docker Build Test
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v4
# - uses: docker/setup-buildx-action@v3
# - name: Log in to GHCR (for registry cache)
# uses: docker/login-action@v3
# with:
# registry: ghcr.io
# username: ${{ github.repository_owner }}
# password: ${{ secrets.GHCR_TOKEN }}
# - uses: docker/build-push-action@v6
# with:
# context: .
# file: docker/Dockerfile
# push: false
# tags: snapotter:ci
# build-args: SKIP_MODEL_DOWNLOADS=true
# cache-from: type=registry,ref=ghcr.io/snapotter-hq/snapotter:cache-linux-amd64
# cache-to: type=registry,ref=ghcr.io/snapotter-hq/snapotter:cache-ci,mode=max