[render preview] web: reintroduce server aggregator for agents + fix store empty-state #4
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: Lighthouse CI | |
| on: | |
| pull_request: | |
| push: | |
| branches: [ main ] | |
| jobs: | |
| lhci: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup Bun | |
| uses: oven-sh/setup-bun@v2 | |
| with: | |
| bun-version: '1.1.34' | |
| - name: Install dependencies (workspace) | |
| run: bun install --frozen-lockfile | |
| - name: Build web | |
| working-directory: web | |
| run: bun run build | |
| env: | |
| NEXT_PUBLIC_CODEBUFF_APP_URL: http://127.0.0.1:3000 | |
| - name: Start Next server | |
| working-directory: web | |
| run: | | |
| export NEXT_PUBLIC_WEB_PORT=3000 | |
| export E2E_ENABLE_QUERY_FIXTURE=1 | |
| nohup bun run start >/tmp/web.log 2>&1 & | |
| echo $! > /tmp/web.pid | |
| for i in {1..60}; do | |
| if curl -sSf http://127.0.0.1:3000/store?e2eFixture=1 >/dev/null; then | |
| echo "Server is up"; break; fi; sleep 1; done | |
| - name: Run Lighthouse CI | |
| working-directory: web | |
| run: bunx lhci autorun --config=lighthouserc.json | |
| - name: Upload server logs on failure | |
| if: failure() | |
| run: | | |
| echo "\n--- web server log ---\n" | |
| cat /tmp/web.log || true | |
| - name: Stop Next server | |
| if: always() | |
| run: | | |
| if [ -f /tmp/web.pid ]; then kill $(cat /tmp/web.pid) || true; fi | |