Spaces:
Build error
Build error
| # Tests CI — déclenché sur tous les push et les PR vers main. | |
| # | |
| # Aucun secret requis : tous les tests sont mockés (pas d'appel Google AI réel). | |
| name: Tests | |
| on: | |
| push: | |
| pull_request: | |
| branches: | |
| - main | |
| workflow_call: # permet l'appel depuis deploy-hf.yml (needs: tests) | |
| jobs: | |
| tests: | |
| runs-on: ubuntu-latest | |
| env: | |
| FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true # opt-in Node.js 24 (requis dès juin 2026) | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Setup Python 3.11 | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.11" | |
| cache: "pip" | |
| cache-dependency-path: "backend/pyproject.toml" | |
| - name: Install backend with dev dependencies | |
| run: pip install -e "backend/[dev]" | |
| - name: Run backend tests | |
| run: pytest backend/tests/ --tb=short -q | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: "20" | |
| cache: "npm" | |
| cache-dependency-path: "frontend/package-lock.json" | |
| - name: Install frontend dependencies | |
| run: cd frontend && npm ci | |
| - name: Run frontend tests | |
| run: cd frontend && npm test | |