test(e2e): validate manifest icons instead of favicon PNG assumptions #7
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: E2E Tests | |
| on: | |
| push: | |
| tags: | |
| - '*-ux' | |
| - '*-prerelease' | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| models: read | |
| jobs: | |
| e2e: | |
| name: E2E UX regression tests | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 30 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup Bun | |
| uses: oven-sh/setup-bun@v2 | |
| - name: Install dependencies | |
| run: bun install --frozen-lockfile | |
| - name: Install E2E dependencies | |
| run: bun install --frozen-lockfile | |
| working-directory: tests/e2e | |
| - name: Install Playwright browsers | |
| run: bunx playwright install chromium | |
| working-directory: tests/e2e | |
| - name: Configure LLM provider (GitHub Models) | |
| run: bun run setup/configure-github-models.ts | |
| working-directory: tests/e2e | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Configure LLM fallback (OpenCode ZEN) | |
| run: bun run setup/configure-test-instance.ts | |
| working-directory: tests/e2e | |
| - name: Start PiClaw instance | |
| run: | | |
| # Generate a test internal secret | |
| export PICLAW_INTERNAL_SECRET=$(openssl rand -hex 16) | |
| echo "PICLAW_INTERNAL_SECRET=$PICLAW_INTERNAL_SECRET" >> $GITHUB_ENV | |
| # Start piclaw in background with test config | |
| export PICLAW_WORKSPACE=$(mktemp -d) | |
| echo "PICLAW_WORKSPACE=$PICLAW_WORKSPACE" >> $GITHUB_ENV | |
| mkdir -p "$PICLAW_WORKSPACE/.piclaw" | |
| # Write minimal config | |
| echo '{"sessionAutoRotate":true}' > "$PICLAW_WORKSPACE/.piclaw/config.json" | |
| # Start server | |
| export PICLAW_WEB_PORT=3000 | |
| echo "PICLAW_WEB_PORT=$PICLAW_WEB_PORT" >> $GITHUB_ENV | |
| bun run start > "$PICLAW_WORKSPACE/piclaw-e2e-server.log" 2>&1 & | |
| SERVER_PID=$! | |
| echo "SERVER_PID=$SERVER_PID" >> $GITHUB_ENV | |
| # Wait for server to be ready | |
| for i in $(seq 1 30); do | |
| if curl -sf http://localhost:3000/ > /dev/null 2>&1; then | |
| echo "Server ready after ${i}s" | |
| break | |
| fi | |
| if ! kill -0 "$SERVER_PID" 2>/dev/null; then | |
| echo "Server process exited before becoming ready" >&2 | |
| exit 1 | |
| fi | |
| sleep 1 | |
| done | |
| - name: Validate test environment | |
| run: bun run setup/validate-test-config.ts | |
| working-directory: tests/e2e | |
| env: | |
| PICLAW_E2E_URL: http://localhost:3000 | |
| PICLAW_INTERNAL_SECRET: ${{ env.PICLAW_INTERNAL_SECRET }} | |
| - name: Run E2E tests | |
| run: bun run test -- --project=desktop-chrome | |
| working-directory: tests/e2e | |
| env: | |
| PICLAW_E2E_URL: http://localhost:3000 | |
| PICLAW_INTERNAL_SECRET: ${{ env.PICLAW_INTERNAL_SECRET }} | |
| - name: Generate PDF report | |
| if: always() | |
| run: bun run report | |
| working-directory: tests/e2e | |
| - name: Upload test report | |
| if: always() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: e2e-report | |
| path: | | |
| tests/e2e/reports/piclaw-e2e-report.pdf | |
| tests/e2e/reports/piclaw-e2e-report.html | |
| tests/e2e/reports/results.json | |
| retention-days: 14 | |
| - name: Upload test results | |
| if: always() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: e2e-results | |
| path: tests/e2e/test-results/ | |
| retention-days: 7 | |
| - name: Stop server | |
| if: always() | |
| run: kill $SERVER_PID 2>/dev/null || true |