--- name: E2E Playwright on: workflow_dispatch: {} permissions: # `actions: read` lets scripts/ci-cancel-aware.sh poll the run status so # cancelled builds inside container jobs stop themselves (docker exec # swallows the runner's signals). actions: read contents: read packages: read env: # Consumed by scripts/ci-cancel-aware.sh's cancellation watchdog. GH_TOKEN: ${{ github.token }} concurrency: group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true jobs: e2e-playwright: name: E2E (Playwright / web lane) runs-on: ubuntu-22.04 container: image: ghcr.io/tinyhumansai/openhuman_ci:latest # The complete serial web suite currently takes about 45 minutes on the # shared runner; keep the standalone diagnostic workflow aligned with the # 90-minute budget used by CI Full. timeout-minutes: 90 steps: - name: Checkout code uses: actions/checkout@v7 with: fetch-depth: 1 persist-credentials: false submodules: recursive - name: Cache pnpm store uses: actions/cache@v6 with: path: ~/.local/share/pnpm/store key: pnpm-store-${{ runner.os }}-${{ hashFiles('pnpm-lock.yaml') }} restore-keys: | pnpm-store-${{ runner.os }}- - name: Cache Rust build artifacts uses: Swatinem/rust-cache@v2 with: workspaces: | . -> target app/src-tauri -> target cache-on-failure: true key: e2e-playwright-linux - name: Install JS dependencies run: bash scripts/ci-cancel-aware.sh pnpm install --frozen-lockfile - name: Ensure .env exists for E2E build run: | touch .env touch app/.env - name: Build Playwright web E2E bundle + standalone core run: bash scripts/ci-cancel-aware.sh pnpm --filter openhuman-app test:e2e:web:build - name: Install Playwright Chromium headless shell run: bash scripts/ci-cancel-aware.sh pnpm --filter openhuman-app exec playwright install chromium-headless-shell - name: Run Playwright web E2E suite env: OPENHUMAN_WORKSPACE: ${{ runner.temp }}/openhuman-playwright-workspace run: | mkdir -p "$OPENHUMAN_WORKSPACE" bash scripts/ci-cancel-aware.sh bash app/scripts/e2e-web-session.sh - name: Pack Playwright E2E failure artifacts if: failure() run: | mkdir -p .ci/artifacts tar -czf .ci/artifacts/openhuman-playwright-failure-logs.tar.gz \ -C "$OPENHUMAN_WORKSPACE" . env: OPENHUMAN_WORKSPACE: ${{ runner.temp }}/openhuman-playwright-workspace - name: Upload Playwright E2E failure artifacts if: failure() uses: actions/upload-artifact@v7 with: name: e2e-playwright-failure-logs-${{ github.run_id }} path: .ci/artifacts/openhuman-playwright-failure-logs.tar.gz retention-days: 7 if-no-files-found: ignore