revert release #152
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: | |
| permissions: | |
| contents: read | |
| # Cancel in-progress runs for the same branch on new pushes. | |
| # Never cancel runs on main (every merge must be fully tested). | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: ${{ github.ref != 'refs/heads/main' }} | |
| jobs: | |
| # ──────────────────────────────────────────────────────────────────────────── | |
| # Lint — ruff (fastest possible feedback, runs in parallel with unit tests) | |
| # ──────────────────────────────────────────────────────────────────────────── | |
| lint: | |
| name: Lint | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: astral-sh/setup-uv@v5 | |
| with: | |
| python-version: "3.12" | |
| - name: Install dev dependencies | |
| run: uv sync --frozen --group dev | |
| - name: Ruff check | |
| run: uv run ruff check . | |
| # ──────────────────────────────────────────────────────────────────────────── | |
| # Unit tests — fast, no model download, runs in parallel with lint | |
| # ──────────────────────────────────────────────────────────────────────────── | |
| unit: | |
| name: Unit tests | |
| runs-on: ubuntu-latest | |
| needs: [lint] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: astral-sh/setup-uv@v5 | |
| with: | |
| python-version: "3.12" | |
| - name: Install dependencies | |
| run: uv sync --frozen --extra cpu | |
| - name: Run unit tests | |
| run: uv run pytest tests/unit/ -v | |
| # ──────────────────────────────────────────────────────────────────────────── | |
| # Integration tests — real inference, requires model weights | |
| # Only runs after lint + unit both pass (fail fast) | |
| # ──────────────────────────────────────────────────────────────────────────── | |
| integration: | |
| name: Integration tests | |
| runs-on: ubuntu-latest | |
| needs: [unit] | |
| timeout-minutes: 30 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: astral-sh/setup-uv@v5 | |
| with: | |
| python-version: "3.12" | |
| - name: Install dependencies | |
| run: uv sync --frozen --extra cpu | |
| - name: Set model cache path | |
| run: echo "VIZION3D_MODEL_CACHE=$HOME/.cache/vizion3d/models" >> "$GITHUB_ENV" | |
| - name: Cache model weights | |
| uses: actions/cache@v4 | |
| with: | |
| path: ${{ env.VIZION3D_MODEL_CACHE }} | |
| # Key is tied to the model filenames — bump if either model changes | |
| key: depth-anything-v2-vitb-stereo-depth-s2m2-l-pth | |
| - name: Show integration timing limits | |
| env: | |
| VIZION3D_TEST_DEPTH_COLD_LIMIT: ${{ vars.VIZION3D_TEST_DEPTH_COLD_LIMIT || vars.VIZION3D_TEST_COLD_LIMIT || '10' }} | |
| VIZION3D_TEST_DEPTH_WARM_LIMIT: ${{ vars.VIZION3D_TEST_DEPTH_WARM_LIMIT || vars.VIZION3D_TEST_WARM_LIMIT || '1' }} | |
| VIZION3D_TEST_STEREO_COLD_LIMIT: ${{ vars.VIZION3D_TEST_STEREO_COLD_LIMIT || '60' }} | |
| VIZION3D_TEST_STEREO_WARM_LIMIT: ${{ vars.VIZION3D_TEST_STEREO_WARM_LIMIT || '5' }} | |
| run: | | |
| echo "VIZION3D_TEST_DEPTH_COLD_LIMIT=$VIZION3D_TEST_DEPTH_COLD_LIMIT" | |
| echo "VIZION3D_TEST_DEPTH_WARM_LIMIT=$VIZION3D_TEST_DEPTH_WARM_LIMIT" | |
| echo "VIZION3D_TEST_STEREO_COLD_LIMIT=$VIZION3D_TEST_STEREO_COLD_LIMIT" | |
| echo "VIZION3D_TEST_STEREO_WARM_LIMIT=$VIZION3D_TEST_STEREO_WARM_LIMIT" | |
| - name: Run integration tests | |
| env: | |
| VIZION3D_TEST_DEPTH_COLD_LIMIT: ${{ vars.VIZION3D_TEST_DEPTH_COLD_LIMIT || vars.VIZION3D_TEST_COLD_LIMIT || '10' }} | |
| VIZION3D_TEST_DEPTH_WARM_LIMIT: ${{ vars.VIZION3D_TEST_DEPTH_WARM_LIMIT || vars.VIZION3D_TEST_WARM_LIMIT || '1' }} | |
| VIZION3D_TEST_STEREO_COLD_LIMIT: ${{ vars.VIZION3D_TEST_STEREO_COLD_LIMIT || '60' }} | |
| VIZION3D_TEST_STEREO_WARM_LIMIT: ${{ vars.VIZION3D_TEST_STEREO_WARM_LIMIT || '5' }} | |
| run: uv run pytest tests/integration/ -v |