Fix CI error involving Sentry env var #234
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
| # Runs build, unit tests, and E2E tests - gates deployment | |
| name: CI - Build & Test | |
| on: | |
| push: | |
| pull_request: | |
| branches: [main] | |
| jobs: | |
| build-and-test: | |
| name: Build and Test | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: "22.x" | |
| cache: 'npm' | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Run TypeScript check | |
| run: npm run check | |
| - name: Run lint | |
| run: npm run lint | |
| - name: Run unit tests | |
| run: npm test -- --run | |
| - name: Build project | |
| run: npm run build | |
| env: | |
| NODE_ENV: production | |
| - name: Install Playwright browsers | |
| run: npx playwright install --with-deps | |
| - name: Run Playwright E2E tests | |
| run: npx playwright test | |
| - name: Upload Playwright report | |
| uses: actions/upload-artifact@v4 | |
| if: always() | |
| with: | |
| name: playwright-report | |
| path: playwright-report/ | |
| retention-days: 30 | |
| - name: Upload test coverage | |
| uses: actions/upload-artifact@v4 | |
| if: always() | |
| with: | |
| name: test-coverage | |
| path: coverage/ | |
| retention-days: 30 | |
| # This job will only run after build-and-test succeeds | |
| deployment-ready: | |
| name: Deployment Gate | |
| runs-on: ubuntu-latest | |
| needs: build-and-test | |
| if: github.ref == 'refs/heads/main' | |
| steps: | |
| - name: All tests passed | |
| run: echo "✅ All tests passed. Deployment can proceed." | |
| deploy-to-vercel: | |
| name: Deploy to Vercel | |
| runs-on: ubuntu-latest | |
| needs: deployment-ready | |
| if: github.ref == 'refs/heads/main' && success() | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Deploy to Vercel | |
| uses: amondnet/vercel-action@v25 | |
| with: | |
| vercel-token: ${{ secrets.VERCEL_TOKEN }} | |
| vercel-args: '--prod' | |
| vercel-project-id: ${{ secrets.VERCEL_PROJECT_ID }} | |
| vercel-org-id: ${{ secrets.VERCEL_ORG_ID }} | |
| env: | |
| VERCEL_TOKEN: ${{ secrets.VERCEL_TOKEN }} |