mirror of
https://github.com/stablyai/orca.git
synced 2026-10-30 16:47:34 +00:00
test(e2e): mixed-version, two-client and phone layout baselines recorded on main (#27688)
* test(e2e): record mixed-version, two-client and phone layout baselines on main (P3) * test(e2e): P3 review fixes: reconnect and I/O proof, restart order bounds, Linux-only baselines * test(e2e): re-record Linux phone and serve-restart baselines * test(e2e): P3: echo drawn in the desktop pane; bound the group selection after restart * test(e2e): re-record serve-restart group selection * test(e2e): name P3 baseline helpers for what they record
This commit is contained in:
@@ -1,4 +1,7 @@
|
||||
name: Packaged browser compatibility
|
||||
# Both jobs pair the current build with a pinned released one. `layout-compat` holds all the layout
|
||||
# rework baselines (P3), compared with the shapes recorded on main in
|
||||
# tests/e2e/layout-compat-baselines.json; its artifact carries the observed shapes for re-recording.
|
||||
on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
@@ -30,27 +33,11 @@ jobs:
|
||||
with:
|
||||
native-runtime: electron
|
||||
- name: Download pinned old release
|
||||
env:
|
||||
GH_TOKEN: ${{ github.token }}
|
||||
run: |
|
||||
gh release download v1.4.188 --repo stablyai/orca --pattern orca-ide_1.4.188_amd64.deb --dir "$RUNNER_TEMP/old-orca"
|
||||
python3 - <<'PYVERIFY'
|
||||
import base64,hashlib,os,pathlib,subprocess
|
||||
root=pathlib.Path(os.environ['RUNNER_TEMP'])/'old-orca'
|
||||
package=root/'orca-ide_1.4.188_amd64.deb'
|
||||
expected='uGONFUDfinYggxcT9ac72wnnlofLQaqasDDeP0HWOSqarBwTi1Ax3khmzKUY3vUnvuYOpSCEmsH4InzLZ2vg6g=='
|
||||
digest=hashlib.sha512()
|
||||
with package.open('rb') as archive:
|
||||
for block in iter(lambda: archive.read(1024*1024), b''):
|
||||
digest.update(block)
|
||||
assert base64.b64encode(digest.digest()).decode()==expected
|
||||
extracted=root/'extracted'
|
||||
subprocess.run(['dpkg-deb','-x',str(package),str(extracted)],check=True)
|
||||
executable=extracted/'opt'/'Orca'/'orca-ide'
|
||||
assert executable.is_file() and os.access(executable,os.X_OK)
|
||||
with open(os.environ['GITHUB_ENV'],'a') as env: env.write('ORCA_CROSS_VERSION_PACKAGED_EXECUTABLE='+str(executable)+'\n')
|
||||
print('Verified old package:',executable)
|
||||
PYVERIFY
|
||||
uses: ./.github/actions/download-pinned-orca-release
|
||||
with:
|
||||
version: 1.4.188
|
||||
sha512: uGONFUDfinYggxcT9ac72wnnlofLQaqasDDeP0HWOSqarBwTi1Ax3khmzKUY3vUnvuYOpSCEmsH4InzLZ2vg6g==
|
||||
github-token: ${{ github.token }}
|
||||
- name: Build current Electron app
|
||||
env:
|
||||
VITE_EXPOSE_STORE: 'true'
|
||||
@@ -76,3 +63,56 @@ jobs:
|
||||
name: packaged-mixed-version-audit
|
||||
path: test-results/
|
||||
retention-days: 3
|
||||
layout-compat:
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 30
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
with:
|
||||
ref: ${{ inputs.ref || github.sha }}
|
||||
persist-credentials: false
|
||||
- name: Install headless tools
|
||||
run: sudo apt-get update && sudo apt-get install -y build-essential openssh-client python3 ripgrep xvfb zsh openbox x11-utils
|
||||
- uses: ./.github/actions/install-node-dependencies
|
||||
with:
|
||||
native-runtime: electron
|
||||
- name: Download pinned old release
|
||||
uses: ./.github/actions/download-pinned-orca-release
|
||||
with:
|
||||
version: 1.4.224
|
||||
sha512: +/VyaYSgqSAuSSWe1ySrCKRjHHJ6REXqmz58g69bxvoUdV41iH9vlobM18xdxWTkgJF2kbu/tSKFvH0jMnZ0+Q==
|
||||
github-token: ${{ github.token }}
|
||||
- name: Build current Electron app
|
||||
env:
|
||||
VITE_EXPOSE_STORE: 'true'
|
||||
run: |
|
||||
pnpm run build:relay
|
||||
pnpm exec electron-vite build --mode e2e
|
||||
pnpm run build:cli
|
||||
pnpm run build:web-from-renderer
|
||||
# The two specs without a released build ride along, so one dispatch reruns every baseline.
|
||||
- name: Run the layout baselines
|
||||
env:
|
||||
ORCA_LAYOUT_COMPAT_REPORT_DIR: test-results/layout-compat
|
||||
run: >-
|
||||
xvfb-run --auto-servernum bash .github/scripts/e2e-with-window-manager.sh
|
||||
env SKIP_BUILD=1 ORCA_E2E_FORWARD_APP_LOGS=1
|
||||
pnpm exec playwright test --config tests/playwright.config.ts
|
||||
tests/e2e/layout-compat-old-desktop-on-new-server.spec.ts
|
||||
tests/e2e/layout-compat-new-desktop-on-old-server.spec.ts
|
||||
tests/e2e/layout-compat-old-phone-on-new-server.spec.ts
|
||||
tests/e2e/layout-compat-serve-restart-keeps-at-at-terminals.spec.ts
|
||||
--project=electron-headless --workers=1 --retries=0 --reporter=list
|
||||
- name: Require every layout scenario to have run
|
||||
if: always()
|
||||
# A missing env skips the specs and passes; each run writes its observation first.
|
||||
run: |
|
||||
for scenario in old-desktop-on-new-server old-cli-terminal-create new-desktop-on-old-server old-phone-on-new-server serve-restart-keeps-@@-terminals; do
|
||||
test -f "test-results/layout-compat/$scenario.linux.json" || { echo "::error::$scenario did not run"; exit 1; }
|
||||
done
|
||||
- uses: actions/upload-artifact@v7
|
||||
if: always()
|
||||
with:
|
||||
name: packaged-layout-compat
|
||||
path: test-results/
|
||||
retention-days: 7
|
||||
|
||||
Reference in New Issue
Block a user