Spaces:
Running
Running
| name: CI | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| python-version: ["3.11", "3.12", "3.13"] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install uv | |
| run: pip install uv | |
| - name: Install dependencies (uses uv.lock for reproducible installs) | |
| run: uv sync --extra dev | |
| - name: Run tests | |
| run: uv run pytest tests/ -v --tb=short | |
| - name: Run annotate benchmarks (quick regression gate) | |
| run: uv run pytest benchmarks/ -v -m benchmark -k "Annotate or BboxFormat or annotate" | |
| - name: Run full benchmark suite | |
| run: uv run pytest benchmarks/ -v -m benchmark | |
| - name: Verify app builds | |
| run: uv run python -c "from app import build_app; app = build_app(); print(f'Builds OK: {app.title}')" | |
| # ββ Python 3.14 compatibility gate ββββββββββββββββββββββββββββββββββ | |
| # 3.14 is the documented development runtime (AGENTS.md) and the version | |
| # where the mlx C-extension segfault was diagnosed (addendum 2026-06-09). | |
| # We run it as an experimental, non-blocking job so 3.14 regressions | |
| # (e.g. a new C-extension imported at module top-level) surface in CI | |
| # without breaking the main gate until the stack is confirmed stable. | |
| # The test_import_audit suite is the key defense β it verifies no | |
| # C-extensions load at provider import time. | |
| test-py314: | |
| runs-on: ubuntu-latest | |
| continue-on-error: true | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python 3.14 | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.14" | |
| - name: Install uv | |
| run: pip install uv | |
| - name: Install dependencies | |
| run: uv sync --extra dev | |
| - name: Run import audit (C-extension segfault guard) | |
| run: uv run pytest tests/test_import_audit.py -v | |
| - name: Run full test suite | |
| run: uv run pytest tests/ -v --tb=short | |
| lint: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.13" | |
| - name: Install uv | |
| run: pip install uv | |
| - name: Install dependencies (uses uv.lock for reproducible installs) | |
| run: uv sync --extra dev | |
| - name: Check imports | |
| run: uv run python -c "import shopstack; import app; print('All imports OK')" | |