# Runs on every push to main and every pull request. Green means: the dashboard # tests pass, both dashboard builds succeed and the backend tests pass. # Model weights are not in Git. The application tests use software fixtures instead of # real models (tests/conftest.py), so they run here too; only the two tests that # read the real embedding model are skipped. They still run on a full local installation. name: CI on: push: branches: [main] pull_request: workflow_dispatch: permissions: contents: read concurrency: group: ci-${{ github.ref }} cancel-in-progress: true jobs: dashboard: name: Dashboard tests and builds runs-on: ubuntu-latest timeout-minutes: 15 defaults: run: working-directory: frontend steps: - uses: actions/checkout@v7 - uses: actions/setup-node@v7 with: node-version: 22 cache: npm cache-dependency-path: frontend/package-lock.json - name: Install exact dependencies run: npm ci --no-audit --no-fund - name: Unit and screen tests run: npm test - name: Build the working dashboard run: npm run build - name: Build the public showcase run: npm run build:showcase - name: Batch queue test run: node ../tests/test_space_batch.mjs backend: name: Backend tests (no model files) runs-on: ubuntu-latest timeout-minutes: 30 steps: - uses: actions/checkout@v7 - uses: actions/setup-python@v7 with: python-version: '3.11' cache: pip cache-dependency-path: requirements.txt - name: Install CPU-only PyTorch, then the app requirements run: | python -m pip install --upgrade pip pip install torch==2.8.0 torchvision==0.23.0 --index-url https://download.pytorch.org/whl/cpu pip install -r requirements.txt - name: Lint (unused code, likely bugs, unexplained broad excepts) run: | pip install ruff==0.17.3 python -m ruff check # Fix a failure locally with: python -m ruff format backend - name: Check formatting run: python -m ruff format --check backend - name: Type check the backend run: | pip install mypy==2.4.1 python -m mypy - name: Run tests env: USE_TF: '0' run: python -m pytest tests -q