Add search UI smoke tests and CI coverage #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: | |
| pull_request: | |
| jobs: | |
| frontend: | |
| name: Frontend checks | |
| runs-on: ubuntu-latest | |
| defaults: | |
| run: | |
| working-directory: apps/web | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Set up Node | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: "22" | |
| cache: npm | |
| cache-dependency-path: apps/web/package-lock.json | |
| - name: Install frontend dependencies | |
| run: npm ci | |
| - name: Lint frontend | |
| run: npm run lint | |
| - name: Build frontend | |
| run: npm run build | |
| - name: Install Playwright Chromium | |
| run: npx playwright install --with-deps chromium | |
| - name: Run frontend smoke tests | |
| run: npm run test:e2e | |
| backend: | |
| name: Backend tests | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Set up Python | |
| if: ${{ hashFiles('apps/api/requirements.txt') != '' }} | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.12" | |
| - name: Run backend tests when scaffold exists | |
| shell: bash | |
| run: | | |
| if [ -f apps/api/requirements.txt ]; then | |
| cd apps/api | |
| python -m pip install --upgrade pip | |
| python -m pip install -r requirements.txt | |
| pytest | |
| else | |
| echo "apps/api has no Python project file yet; skipping backend test placeholder." | |
| fi |