From 5612d660c985ff55cb36a2e128774577cba46794 Mon Sep 17 00:00:00 2001 From: stepandel Date: Wed, 4 Feb 2026 17:25:12 -0800 Subject: [PATCH 1/3] feat: add GitHub Actions workflow for E2E tests Add Playwright E2E test workflow that runs on PRs and pushes to master. Uses Xvfb for headless Electron testing on Ubuntu runners. Co-Authored-By: Claude Opus 4.5 --- .github/workflows/e2e-tests.yml | 61 +++++++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 .github/workflows/e2e-tests.yml diff --git a/.github/workflows/e2e-tests.yml b/.github/workflows/e2e-tests.yml new file mode 100644 index 0000000..53c64d9 --- /dev/null +++ b/.github/workflows/e2e-tests.yml @@ -0,0 +1,61 @@ +name: E2E Tests + +on: + push: + branches: [master] + pull_request: + branches: [master] + +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true + +jobs: + e2e-tests: + runs-on: ubuntu-latest + timeout-minutes: 30 + + env: + CI: true + NODE_ENV: test + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Setup pnpm + uses: pnpm/action-setup@v4 + with: + version: 9 + + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: '22' + cache: 'pnpm' + + - name: Install dependencies + run: pnpm install --frozen-lockfile + + - name: Install system dependencies for Electron + run: | + sudo apt-get update + sudo apt-get install -y libnss3 libatk-bridge2.0-0 libgtk-3-0 libgbm1 libasound2 + + - name: Build Electron app + run: pnpm test:build + + - name: Run E2E tests with Xvfb + run: xvfb-run --auto-servernum --server-args="-screen 0 1920x1080x24" pnpm exec playwright test + env: + PINECONE_API_KEY: ${{ secrets.PINECONE_API_KEY }} + + - name: Upload test artifacts + if: always() + uses: actions/upload-artifact@v4 + with: + name: playwright-report + path: | + playwright-report/ + test-results/ + retention-days: 7 From b60ce29e8210a0cb843311468b5b6e6d99738acd Mon Sep 17 00:00:00 2001 From: stepandel Date: Wed, 4 Feb 2026 17:34:10 -0800 Subject: [PATCH 2/3] fix: use libasound2t64 for Ubuntu 24.04 compatibility Ubuntu 24.04 (noble) renamed libasound2 to libasound2t64. Co-Authored-By: Claude Opus 4.5 --- .github/workflows/e2e-tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/e2e-tests.yml b/.github/workflows/e2e-tests.yml index 53c64d9..67de3cb 100644 --- a/.github/workflows/e2e-tests.yml +++ b/.github/workflows/e2e-tests.yml @@ -40,7 +40,7 @@ jobs: - name: Install system dependencies for Electron run: | sudo apt-get update - sudo apt-get install -y libnss3 libatk-bridge2.0-0 libgtk-3-0 libgbm1 libasound2 + sudo apt-get install -y libnss3 libatk-bridge2.0-0 libgtk-3-0 libgbm1 libasound2t64 - name: Build Electron app run: pnpm test:build From 10351db0ee33503c14530745d16a02fdbebba7fd Mon Sep 17 00:00:00 2001 From: stepandel Date: Wed, 4 Feb 2026 18:00:39 -0800 Subject: [PATCH 3/3] fix: add --no-sandbox flag for CI in layout-ui tests The layout-ui tests use a separate electron-app.ts helper that was missing the --no-sandbox flag needed for GitHub Actions runners. Co-Authored-By: Claude Opus 4.5 --- e2e/helpers/electron-app.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/e2e/helpers/electron-app.ts b/e2e/helpers/electron-app.ts index 3909a12..12d9e4e 100644 --- a/e2e/helpers/electron-app.ts +++ b/e2e/helpers/electron-app.ts @@ -49,9 +49,15 @@ export async function launchApp(): Promise<{ app: ElectronApplication; page: Pag // Clear encrypted stores to avoid encryption key mismatch clearEncryptedStores(testUserDataDir); + // Build args - add --no-sandbox for CI environments (GitHub Actions, etc.) + const args = [appPath]; + if (process.env.CI) { + args.unshift('--no-sandbox'); + } + // Launch Electron app const app = await electron.launch({ - args: [appPath], + args, env: { ...process.env, NODE_ENV: 'test',