Fix backend CI Python path #2
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/CD Checks | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| jobs: | |
| backend: | |
| name: Backend Tests, Lint, Security | |
| runs-on: ubuntu-latest | |
| defaults: | |
| run: | |
| working-directory: backend | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.12" | |
| - name: Install backend dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install -r requirements.txt | |
| pip install pytest pytest-cov ruff bandit | |
| - name: Run backend tests | |
| env: | |
| PYTHONPATH: . | |
| run: pytest -v --cov=app --cov-report=term-missing | |
| - name: Run backend lint | |
| env: | |
| PYTHONPATH: . | |
| run: ruff check app tests | |
| - name: Run backend security scan | |
| run: bandit -r app -ll | |
| frontend: | |
| name: Frontend Build and Lint | |
| runs-on: ubuntu-latest | |
| defaults: | |
| run: | |
| working-directory: frontend | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Set up 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: npm ci | |
| - name: Run frontend build | |
| run: npm run build | |
| - name: Run frontend lint | |
| run: npm run lint --if-present |