From 3deb6fad83ae8b1e50717a33a587f4620139bddf Mon Sep 17 00:00:00 2001 From: DavertMik Date: Sat, 13 Jun 2026 13:13:21 +0300 Subject: [PATCH] ci(acceptance): add hang-proof Playwright smoke gate Re-establishes acceptance-level CI signal for 4.x, which currently runs only unit/rest/runner suites while the disabled acceptance workflow still targets 3.x + docker WebDriverIO. - test/acceptance/codecept.Playwright.smoke.js: an explicit allowlist (els/session/within) of acceptance tests that pass reliably on the 4.x promise core. 52 passed / 2 skipped / 0 failed across three consecutive local runs. - .github/workflows/acceptance-smoke.yml: runs the smoke suite on every PR with both timeout-minutes: 20 and an outer `timeout 600` (exit 124 = hang = release blocker), installs Chromium, boots the PHP test app, and uploads test/acceptance/output/ on failure. The allowlist only grows: when a promise-core fix makes an excluded file pass, move it into the glob in the same PR. Long-term goal is to gate on the full codecept.Playwright.js and delete this config. Co-Authored-By: Claude Opus 4.8 --- .github/workflows/acceptance-smoke.yml | 52 ++++++++++++++++++++ test/acceptance/codecept.Playwright.smoke.js | 11 +++++ 2 files changed, 63 insertions(+) create mode 100644 .github/workflows/acceptance-smoke.yml create mode 100644 test/acceptance/codecept.Playwright.smoke.js diff --git a/.github/workflows/acceptance-smoke.yml b/.github/workflows/acceptance-smoke.yml new file mode 100644 index 000000000..7f04c1da8 --- /dev/null +++ b/.github/workflows/acceptance-smoke.yml @@ -0,0 +1,52 @@ +name: Acceptance smoke + +on: + push: + branches: + - 4.x + pull_request: + branches: + - '**' + +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true + +jobs: + acceptance-smoke: + name: Acceptance smoke (Playwright) + runs-on: ubuntu-22.04 + timeout-minutes: 20 + + strategy: + matrix: + node-version: [20.x] + + steps: + - uses: actions/checkout@v6 + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v6 + with: + node-version: ${{ matrix.node-version }} + - run: npm i + env: + PUPPETEER_SKIP_CHROMIUM_DOWNLOAD: true + - name: Install Chromium + run: npx playwright install --with-deps chromium + - name: Start test app server + run: nohup npm run test-app:start & + - name: Wait for test app server + run: | + for i in {1..20}; do + curl -sf http://127.0.0.1:8000/ && break + sleep 1 + done + - name: Run acceptance smoke suite (hang-proof) + run: timeout 600 ./bin/codecept.js run --config test/acceptance/codecept.Playwright.smoke.js + - name: Upload acceptance output on failure + if: failure() + uses: actions/upload-artifact@v4 + with: + name: acceptance-smoke-output + path: test/acceptance/output/ + if-no-files-found: ignore diff --git a/test/acceptance/codecept.Playwright.smoke.js b/test/acceptance/codecept.Playwright.smoke.js new file mode 100644 index 000000000..6e7217454 --- /dev/null +++ b/test/acceptance/codecept.Playwright.smoke.js @@ -0,0 +1,11 @@ +import { config as base } from './codecept.Playwright.js' + +// Allowlist of acceptance tests known to pass reliably on the 4.x promise core. +// As promise-core fixes land and a file in plans/002-failing-acceptance.md +// starts passing, move it into this glob. The long-term goal is to delete this +// config and gate on the full codecept.Playwright.js. +export const config = { + ...base, + tests: './{els,session,within}_test.js', + name: 'acceptance-smoke', +}