feat(examples): ingest end-to-end — a synthetic clip to an approved, … #46
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CI | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| jobs: | |
| python: | |
| runs-on: ubuntu-latest | |
| env: | |
| # ffmpeg is installed below. If that ever breaks, the video tests must go red — a | |
| # silently skipped video test looks exactly like a passing one. | |
| VISIONSET_REQUIRE_FFMPEG: "1" | |
| steps: | |
| - uses: actions/checkout@v4 | |
| # ffmpeg is a binary, not a Python dependency: the video fixtures shell out to it. | |
| - name: Install ffmpeg | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y --no-install-recommends ffmpeg | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v5 | |
| with: | |
| enable-cache: true | |
| - name: Sync environment | |
| run: uv sync | |
| - name: Ruff (lint + format) | |
| run: | | |
| uv run ruff check . | |
| uv run ruff format --check . | |
| - name: Mypy (strict kernel + full src) | |
| run: | | |
| uv run mypy src/visionset/kernel | |
| uv run mypy src/visionset | |
| - name: Import contracts (import-linter) | |
| run: uv run lint-imports | |
| - name: Pytest | |
| run: uv run pytest | |
| # The smoke test above already calls into the example; this proves it also | |
| # runs as a script from a clean checkout, images and all. | |
| - name: SDK end-to-end example | |
| run: uv run python examples/sdk_end_to_end.py | |
| # The ingest half of the same argument, and the one that needs the ffmpeg | |
| # installed above: this example generates its own clip. | |
| - name: Ingest end-to-end example | |
| run: uv run python examples/ingest_end_to_end.py | |
| frontend: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: pnpm/action-setup@v4 # reads packageManager from package.json | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: 24 | |
| cache: pnpm | |
| - name: Install | |
| run: pnpm install --frozen-lockfile | |
| - name: Version sync gate | |
| run: pnpm version:check | |
| - name: Lint | |
| run: pnpm -r lint | |
| - name: Build | |
| run: pnpm -r build | |
| - name: Test | |
| run: pnpm test | |
| openapi: | |
| name: OpenAPI contract drift gate | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v5 | |
| with: | |
| enable-cache: true | |
| - name: Sync environment | |
| run: uv sync | |
| - name: Regenerate openapi.json and fail on drift | |
| run: | | |
| uv run python scripts/export_openapi.py | |
| git diff --exit-code openapi.json || { | |
| echo "::error::openapi.json is stale — run 'uv run python scripts/export_openapi.py' and commit the result." | |
| exit 1 | |
| } |