Spaces:
Running
Running
| name: CI | |
| on: | |
| push: | |
| branches: [main, develop] | |
| pull_request: | |
| branches: [main] | |
| jobs: | |
| # ββ Backend Tests βββββββββββββββββββββββββββββββββββββββββββββββββββββββββ | |
| backend: | |
| name: Backend Tests | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Set up Python 3.10 | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.10" | |
| cache: pip | |
| - name: Install CI dependencies (lightweight subset) | |
| run: | | |
| pip install --upgrade pip | |
| pip install \ | |
| opencv-python-headless==4.9.0.80 \ | |
| numpy==1.26.4 \ | |
| Pillow==10.3.0 \ | |
| scipy==1.13.0 \ | |
| scikit-image==0.23.2 \ | |
| flask==3.0.3 \ | |
| flask-cors==4.0.1 \ | |
| python-dotenv==1.0.1 \ | |
| onnxruntime==1.19.2 \ | |
| pytest==8.2.0 | |
| - name: Run tests | |
| run: python -m pytest tests/ -v --tb=short | |
| # ββ Frontend Build ββββββββββββββββββββββββββββββββββββββββββββββββββββββββ | |
| frontend: | |
| name: Frontend Build | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Set up Node 20 | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: "20" | |
| cache: npm | |
| cache-dependency-path: frontend/package-lock.json | |
| - name: Install dependencies | |
| working-directory: frontend | |
| run: npm ci --silent | |
| - name: Build React app | |
| working-directory: frontend | |
| run: npm run build | |
| - name: Upload React build artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: react-build | |
| path: static/react/ | |
| retention-days: 7 | |