diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index 2a1cca366..b3ce83595 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -29,12 +29,9 @@ jobs: run: npm ci env: DETECT_CHROMEDRIVER_VERSION: true - - name: Install xvfb (linux) - if: matrix.os == 'ubuntu-latest' - run: sudo apt-get install xvfb - name: Run E2E on chrome (linux) if: matrix.os == 'ubuntu-latest' - run: xvfb-run --server-args="-screen 0, 1400x1000x24" --auto-servernum npm run test:e2e:chrome + run: npm run test:e2e:chrome - name: Set screen resolution (windows) if: matrix.os == 'windows-latest' run: Set-DisplayResolution -Width 1920 -Height 1080 -Force diff --git a/wdio.chrome.conf.ts b/wdio.chrome.conf.ts index 64d04dad4..bf90e903b 100644 --- a/wdio.chrome.conf.ts +++ b/wdio.chrome.conf.ts @@ -8,13 +8,28 @@ if (IS_CI) { chromeArgs.push( '--no-sandbox', '--disable-dev-shm-usage', - '--disable-infobars', - '--enable-unsafe-swiftshader' + '--disable-infobars' ); + + if (process.platform === 'linux') { + // Force one software-rendering backend instead of relying on Chrome's + // machine-dependent WebGL fallback selection. + chromeArgs.push( + '--headless=new', + '--use-gl=angle', + '--use-angle=swiftshader' + ); + } else { + chromeArgs.push('--enable-unsafe-swiftshader'); + } } if (!IS_CI && !process.env.HEADED) { - chromeArgs.push('--headless=new', '--enable-unsafe-swiftshader'); + chromeArgs.push( + '--headless=new', + '--use-gl=angle', + '--use-angle=swiftshader' + ); } export const config = { diff --git a/wdio.shared.conf.ts b/wdio.shared.conf.ts index 08f31c7a7..e2d131e4b 100644 --- a/wdio.shared.conf.ts +++ b/wdio.shared.conf.ts @@ -41,7 +41,7 @@ export const applyTestViewport = (browser: any) => export const TEST_PORT = 4567; // for slow connections try: // DOWNLOAD_TIMEOUT=60000 && npm run test:e2e:dev -export const DOWNLOAD_TIMEOUT = Number(process.env.DOWNLOAD_TIMEOUT ?? 20000); +export const DOWNLOAD_TIMEOUT = Number(process.env.DOWNLOAD_TIMEOUT ?? 30000); const IS_CI = !!(process.env.CI || process.env.GITHUB_ACTIONS); @@ -68,7 +68,9 @@ export const config: Options.Testrunner = { // ============ // Capabilities // ============ - maxInstances: IS_CI ? 1 : 6, + // WebGL rendering is resource-intensive enough that six local Chrome + // instances can starve one another and exceed view-rendering timeouts. + maxInstances: IS_CI ? 1 : 3, // // =================== // Test Configurations