Screenshots: 12 real-browser captures + SEO-rich alt text in README +… #49
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: | |
| branches: [main] | |
| jobs: | |
| verify: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| node-version: [18.x, 20.x, 22.x] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Use Node ${{ matrix.node-version }} | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: ${{ matrix.node-version }} | |
| cache: npm | |
| - name: Install | |
| run: npm ci || npm install --no-audit --no-fund | |
| - name: Typecheck | |
| run: npm run typecheck | |
| - name: Test | |
| run: npm test | |
| - name: Build | |
| run: npm run build | |
| - name: Lint | |
| run: npm run lint | |
| continue-on-error: true | |
| smoke: | |
| # Runs the real-browser Playwright suite against a production build. | |
| # Catches regressions that tsc + vitest miss (broken routes, runtime | |
| # hydration errors, console.errors during page render). Single node | |
| # version is enough — same browser engine across the matrix. | |
| runs-on: ubuntu-latest | |
| needs: verify | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: 20.x | |
| cache: npm | |
| - name: Install | |
| run: npm ci || npm install --no-audit --no-fund | |
| - name: Install Playwright browsers | |
| run: npx playwright install --with-deps chromium | |
| - name: Build | |
| run: npm run build | |
| - name: Start production server | |
| run: npx next start -p 3055 & | |
| env: | |
| NODE_ENV: production | |
| - name: Wait for server | |
| run: | | |
| for i in $(seq 1 30); do | |
| if curl -sf http://localhost:3055 > /dev/null; then | |
| echo "server ready" | |
| exit 0 | |
| fi | |
| sleep 2 | |
| done | |
| echo "server failed to start" | |
| exit 1 | |
| - name: Playwright smoke | |
| env: | |
| BASE_URL: http://localhost:3055 | |
| run: npx playwright test tests/smoke.spec.ts --reporter=line | |
| - name: Upload Playwright report on failure | |
| if: failure() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: playwright-report | |
| path: playwright-report/ | |
| retention-days: 7 |