This repository was archived by the owner on Apr 13, 2026. It is now read-only.
Restrict default GitHub token permissions #65
Workflow file for this run
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: | |
| permissions: | |
| contents: read | |
| jobs: | |
| build-and-test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup Node | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 20 | |
| cache: npm | |
| - name: Install deps | |
| run: npm ci | |
| - name: Lint + Typecheck | |
| env: | |
| # Minimal env so prisma/next tooling and env schema are happy | |
| AUTH_SECRET: dummy_auth_secret_abcdefghijklmnopqrstuvwxyz_123456 | |
| DATABASE_URL: file:./dev.db | |
| NODE_ENV: test | |
| NEXT_TELEMETRY_DISABLED: 1 | |
| run: npm run check | |
| - name: Tests with coverage | |
| env: | |
| AUTH_SECRET: dummy_auth_secret_abcdefghijklmnopqrstuvwxyz_123456 | |
| DATABASE_URL: file:./dev.db | |
| NODE_ENV: test | |
| NEXT_TELEMETRY_DISABLED: 1 | |
| run: npm run test:coverage | |
| - name: Upload coverage report | |
| if: always() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: coverage-report | |
| path: coverage | |
| - name: Build | |
| env: | |
| AUTH_SECRET: dummy_auth_secret_abcdefghijklmnopqrstuvwxyz_123456 | |
| DATABASE_URL: file:./dev.db | |
| NODE_ENV: production | |
| NEXT_TELEMETRY_DISABLED: 1 | |
| run: npm run build |