Repository navigation
desktop-e2e #1529
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: desktop-release-review-validation | |
| on: | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| jobs: | |
| root: | |
| runs-on: ${{ (vars.CI_PROVIDER == '' || vars.CI_PROVIDER == 'blacksmith') && 'blacksmith-8vcpu-ubuntu-2404' || 'ubuntu-latest' }} | |
| timeout-minutes: 40 | |
| steps: | |
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 | |
| with: | |
| persist-credentials: false | |
| - uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 | |
| with: | |
| bun-version: 1.4.2 | |
| - uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 | |
| with: | |
| node-version: 22 | |
| - run: command -v rg || (sudo apt-get update && sudo apt-get install -y ripgrep) | |
| - run: bun install --frozen-lockfile | |
| - name: Complete root test gate | |
| env: | |
| VITEST_MAX_WORKERS: '4' | |
| run: | | |
| set -o pipefail | |
| bun run test 2>&1 | tee full-test.log | |
| - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a | |
| if: always() | |
| with: | |
| name: release-review-root-tests | |
| path: full-test.log | |
| native: | |
| runs-on: macos-26 | |
| timeout-minutes: 30 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| variant: [baseline, pinned, canary] | |
| steps: | |
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 | |
| with: | |
| persist-credentials: false | |
| fetch-depth: 2 | |
| - uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 | |
| with: | |
| bun-version: 1.4.2 | |
| - uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 | |
| with: | |
| node-version: 22 | |
| - run: bun install --frozen-lockfile | |
| - if: matrix.variant == 'canary' | |
| working-directory: apps/desktop | |
| run: bun add --no-save -d electron@latest | |
| - name: Restore only the menu guard for the regression control | |
| if: matrix.variant == 'baseline' | |
| run: git show HEAD^:apps/desktop/src/main/menu.ts > apps/desktop/src/main/menu.ts | |
| - working-directory: apps/desktop | |
| run: bun run build | |
| - if: matrix.variant != 'baseline' | |
| working-directory: apps/desktop | |
| run: bunx playwright install chromium | |
| - if: matrix.variant != 'baseline' | |
| run: brew install tmux | |
| - name: Require the unfixed menu to fail for the reported reason | |
| if: matrix.variant == 'baseline' | |
| working-directory: apps/desktop | |
| run: | | |
| set +e | |
| bunx playwright test e2e/smoke.spec.ts -g 'Folder Access opens from the focused main window and server picker' --retries=0 > menu-baseline.log 2>&1 | |
| result=$? | |
| set -e | |
| cat menu-baseline.log | |
| test "$result" -ne 0 | |
| python3 - <<'PY' | |
| import json | |
| from pathlib import Path | |
| reports=list(Path('test-results').rglob('folder-access-menu.json')) | |
| assert len(reports)==1, reports | |
| checks=json.loads(reports[0].read_text())['checks'] | |
| assert len(checks)==2, checks | |
| assert checks[0]['status']=='passed', checks | |
| assert checks[1]['status']=='failed' and checks[1]['shown'] is False and checks[1]['parentUrl'] is None, checks | |
| print('Confirmed: main-window control passes; utility-window menu fails on the original guard.') | |
| PY | |
| - name: Full native suite with zero retries | |
| if: matrix.variant != 'baseline' | |
| working-directory: apps/desktop | |
| run: bunx playwright test --retries=0 | |
| env: | |
| BACKGROUND_EXECUTOR_REPORT_PATH: test-results/background-executor-report.json | |
| TERMINAL_CANCEL_REPORT_PATH: test-results/terminal-cancel-report.json | |
| - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a | |
| if: always() | |
| with: | |
| name: release-review-native-${{ matrix.variant }} | |
| path: | | |
| apps/desktop/test-results | |
| apps/desktop/menu-baseline.log | |
| windows: | |
| runs-on: windows-latest | |
| timeout-minutes: 20 | |
| steps: | |
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 | |
| with: | |
| persist-credentials: false | |
| fetch-depth: 2 | |
| - uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 | |
| with: | |
| bun-version: 1.4.2 | |
| - uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 | |
| with: | |
| node-version: 22 | |
| - run: bun install --frozen-lockfile | |
| - name: Require original test entrypoint to reject Windows | |
| shell: pwsh | |
| run: | | |
| git show HEAD^:apps/desktop/package.json | Set-Content apps/desktop/package.json | |
| $output = & bun run --cwd apps/desktop test src/main/menu.test.ts 2>&1 | Out-String | |
| $result = $LASTEXITCODE | |
| $output | Set-Content windows-baseline.log | |
| Write-Output $output | |
| git restore apps/desktop/package.json | |
| if ($result -eq 0 -or -not $output.Contains('Native desktop modules require macOS or Linux.')) { throw 'Baseline did not reproduce the native prebuild rejection.' } | |
| - name: Run portable cases through the real package test entrypoint | |
| shell: pwsh | |
| run: | | |
| & bun run --cwd apps/desktop test src/main/local-files.test.ts src/main/desktop-executor/runner.test.ts src/main/security-guards.test.ts src/main/config.test.ts src/main/desktop-settings.test.ts --reporter=default --reporter=json --outputFile=../../windows-portable-tests.json | |
| exit $LASTEXITCODE | |
| - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a | |
| if: always() | |
| with: | |
| name: release-review-windows-tests | |
| path: | | |
| windows-baseline.log | |
| windows-portable-tests.json |