chore: ensure issue templates are tracked in git #27
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: | |
| build-test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: 20 | |
| cache: "npm" | |
| # Cache full node_modules tree to avoid reinstalls when lock file unchanged | |
| - name: Cache root node_modules | |
| id: cache-node-modules | |
| uses: actions/cache@v3 | |
| with: | |
| path: | | |
| node_modules | |
| services/**/node_modules | |
| key: ${{ runner.os }}-node-${{ hashFiles('package-lock.json') }} | |
| restore-keys: | | |
| ${{ runner.os }}-node- | |
| # Install root dependencies when cache miss (npm ci fails if node_modules exists) | |
| - name: Install root dependencies | |
| if: steps.cache-node-modules.outputs.cache-hit != 'true' | |
| run: npm ci | |
| env: | |
| PUPPETEER_SKIP_DOWNLOAD: "1" | |
| # Ensure every workspace has its own node_modules | |
| - name: Install workspace dependencies | |
| run: npm install --workspaces | |
| env: | |
| PUPPETEER_SKIP_DOWNLOAD: "1" | |
| # Generate Prisma clients for all services before building | |
| - name: Generate Prisma clients | |
| run: npm run prisma:generate | |
| # Build every workspace (skips web-app which is built separately below) | |
| - name: Build backend workspaces | |
| run: npm run build --workspaces | |
| # Explicit install for the React front-end workspace | |
| - name: Install web-app dependencies | |
| run: npm install --prefix services/web-app | |
| env: | |
| PUPPETEER_SKIP_DOWNLOAD: "1" | |
| # Build the React front-end | |
| - name: Build web-app | |
| run: npm run build --prefix services/web-app | |
| # Run monorepo tests (backend + frontend) | |
| - name: Unit tests | |
| run: npm test --workspaces --if-present |