mirror of
https://github.com/jackwener/OpenCLI.git
synced 2026-09-14 18:25:42 +08:00
fd438c2109
Per-PR e2e-headed Chrome was the dominant PR-time wait (~10-15 min on two platforms) and on fork PRs blocks behind maintainer approval, while the actually-blocking failures it caught in the last 30 days were all e2e-test migrations missed by the authoring PR (#1461 / #1505 workspace ->session) rather than real regressions the unit/typecheck tier missed. PR feedback path is now: - typecheck / unit / lint / adapter / build ← `pull_request` (ci.yml) - extension typecheck / build ← `pull_request` (build-extension.yml) - docs build ← `pull_request` (doc-check.yml) - security audit ← `pull_request` (security.yml) E2E-headed Chrome guards: - push to main / dev (watched paths) - push v* tag (release) - nightly cron 08:00 UTC (added: catches Chrome version drift / flake drift even when no commits touch watched paths) - workflow_dispatch (manual when a PR really wants e2e signal) smoke-test was already gated on `schedule || workflow_dispatch` only (ci.yml), so no change needed there.
91 lines
2.7 KiB
YAML
91 lines
2.7 KiB
YAML
name: E2E Headed Chrome
|
|
|
|
on:
|
|
# E2E removed from `pull_request` to keep PR feedback under ~2 minutes; PR-time
|
|
# protection is the CI workflow (typecheck / unit / lint / adapter / build).
|
|
# E2E still guards `main` directly, runs nightly, and on release tag push so
|
|
# protocol/CDP/extension contract regressions are caught before they ship.
|
|
push:
|
|
branches: [main, dev]
|
|
paths:
|
|
- 'extension/**'
|
|
- 'src/browser/**'
|
|
- 'src/daemon.ts'
|
|
- 'src/execution.ts'
|
|
- 'src/interceptor.ts'
|
|
- 'tests/e2e/**'
|
|
- 'tests/smoke/**'
|
|
- '.github/actions/setup-chrome/**'
|
|
- '.github/workflows/e2e-headed.yml'
|
|
tags: ['v*']
|
|
schedule:
|
|
# Daily 08:00 UTC — catch flake / Chrome-version drift even when no commits
|
|
# touched the watched paths recently.
|
|
- cron: '0 8 * * *'
|
|
workflow_dispatch:
|
|
|
|
concurrency:
|
|
group: e2e-${{ github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
e2e-headed:
|
|
runs-on: ${{ matrix.os }}
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
# NOTE: Windows excluded — browser-actions/setup-chrome hangs during
|
|
# Chrome MSI installation on Windows runners (known issue).
|
|
os: [ubuntu-latest, macos-latest]
|
|
timeout-minutes: 20
|
|
steps:
|
|
- uses: actions/checkout@v6
|
|
|
|
- uses: actions/setup-node@v6
|
|
with:
|
|
node-version: '22'
|
|
cache: 'npm'
|
|
|
|
- name: Install dependencies
|
|
run: npm ci
|
|
|
|
- name: Setup Chrome
|
|
uses: ./.github/actions/setup-chrome
|
|
id: setup-chrome
|
|
|
|
- name: Build
|
|
run: npm run build
|
|
|
|
- name: Build extension
|
|
run: npm run build --prefix extension
|
|
|
|
- name: Run AX Chrome smoke (Linux, via xvfb)
|
|
if: runner.os == 'Linux'
|
|
env:
|
|
CHROME_PATH: ${{ steps.setup-chrome.outputs.chrome-path }}
|
|
OPENCLI_AX_E2E: '1'
|
|
run: |
|
|
xvfb-run --auto-servernum --server-args="-screen 0 1280x720x24" \
|
|
npx vitest run --project e2e tests/e2e/browser-ax-chrome.test.ts --reporter=verbose
|
|
|
|
- name: Run AX Chrome smoke (macOS / Windows)
|
|
if: runner.os != 'Linux'
|
|
env:
|
|
CHROME_PATH: ${{ steps.setup-chrome.outputs.chrome-path }}
|
|
OPENCLI_AX_E2E: '1'
|
|
run: npx vitest run --project e2e tests/e2e/browser-ax-chrome.test.ts --reporter=verbose
|
|
|
|
- name: Run E2E tests (Linux, via xvfb)
|
|
if: runner.os == 'Linux'
|
|
env:
|
|
OPENCLI_AX_E2E: '0'
|
|
run: |
|
|
xvfb-run --auto-servernum --server-args="-screen 0 1280x720x24" \
|
|
npx vitest run tests/e2e/ --reporter=verbose
|
|
|
|
- name: Run E2E tests (macOS / Windows)
|
|
if: runner.os != 'Linux'
|
|
env:
|
|
OPENCLI_AX_E2E: '0'
|
|
run: npx vitest run tests/e2e/ --reporter=verbose
|