build: configure ESLint in Frontend and update security audit thresholds #13
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: | |
| jobs: | |
| backend: | |
| name: Backend Lint and Tests | |
| runs-on: ubuntu-latest | |
| defaults: | |
| run: | |
| working-directory: Backend | |
| env: | |
| TEST_DATABASE_URL: sqlite:///test.db | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.11" | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install -r requirements.txt | |
| pip install ruff pytest-cov | |
| - name: Lint | |
| run: ruff check app tests | |
| - name: Run tests | |
| run: pytest tests -v --maxfail=1 --cov=app --cov-report=term-missing | |
| frontend: | |
| name: Frontend Lint and Build | |
| runs-on: ubuntu-latest | |
| defaults: | |
| run: | |
| working-directory: Frontend | |
| steps: | |
| - name: Checkout | |
| 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 dependencies | |
| run: npm ci | |
| - name: Lint | |
| run: npm run lint | |
| - name: Build | |
| run: npm run build |