ci: set backend test import path #7
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: | |
| branches: ["main"] | |
| jobs: | |
| backend: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.12" | |
| - name: Install backend dependencies | |
| working-directory: backend | |
| run: pip install -r requirements.txt | |
| - name: Import FastAPI app | |
| working-directory: backend | |
| run: python -c "from app.main import app; print(app.title)" | |
| - name: Run backend tests | |
| working-directory: backend | |
| run: PYTHONPATH=. pytest | |
| frontend: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: "22" | |
| - name: Install frontend dependencies | |
| working-directory: frontend | |
| run: npm install | |
| - name: Build frontend | |
| working-directory: frontend | |
| run: npm run build |