From 61d89831bb7cf06ddbed4b32363a4925644e42cd Mon Sep 17 00:00:00 2001 From: Marc Diaz Date: Mon, 16 Mar 2026 11:24:30 -0400 Subject: [PATCH] fix: add xvfb run --- .github/workflows/ci.yml | 5 ++++- tests/e2e/gif-export.spec.ts | 6 +++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 03865e1..757d997 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -54,8 +54,11 @@ jobs: cache: npm - run: npm ci - run: npx playwright install --with-deps chromium + # Install Electron system dependencies not covered by Playwright's chromium deps + - run: npx electron . --version || sudo apt-get install -y libgbm-dev - run: npm run build-vite - - run: npm run test:e2e + # xvfb provides a virtual display; Electron needs one on Linux even with show:false + - run: xvfb-run --auto-servernum npm run test:e2e - uses: actions/upload-artifact@v4 if: failure() with: diff --git a/tests/e2e/gif-export.spec.ts b/tests/e2e/gif-export.spec.ts index d3f876f..b18fd44 100644 --- a/tests/e2e/gif-export.spec.ts +++ b/tests/e2e/gif-export.spec.ts @@ -13,7 +13,11 @@ test("exports a GIF from a loaded video", async () => { const outputPath = path.join(os.tmpdir(), `test-gif-export-${Date.now()}.gif`); const app = await electron.launch({ - args: [MAIN_JS], + args: [ + MAIN_JS, + // Required in CI sandbox environments (GitHub Actions, Docker, etc.) + "--no-sandbox", + ], env: { ...process.env, // Set HEADLESS=false to show windows while debugging.