diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 678f063..a1c81cb 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -18,10 +18,9 @@ jobs: strategy: matrix: os: - - macos-latest - # Testing on Linux is temporarily disabled until we can figure out the SUID sandboxing issue. - # - ubuntu-latest - - windows-latest +# - macos-latest + - ubuntu-latest +# - windows-latest runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v4 @@ -49,10 +48,15 @@ jobs: if: steps.cache.outputs.cache-hit != 'true' run: npm install + - name: Linux workarounds + if: runner.os == 'Linux' + run: sudo sysctl -w kernel.apparmor_restrict_unprivileged_userns=0 + - name: Run tests run: | composer run assets --working-dir=build - npm run test + npx electron-vite build + xvfb-run -- npx playwright test - uses: actions/upload-artifact@v4 if: ${{ !cancelled() }} diff --git a/src/main/main.ts b/src/main/main.ts index 8f7e4bb..b314722 100644 --- a/src/main/main.ts +++ b/src/main/main.ts @@ -17,6 +17,8 @@ import { hideBin } from 'yargs/helpers'; import { PhpCommand } from './PhpCommand'; import { ComposerCommand } from './ComposerCommand'; +app.commandLine.appendSwitch('ozone-platform', 'x11'); + // If any uncaught exception happens, send it to Sentry. Sentry.init({ beforeSend: (event, hint) => { diff --git a/tests/main.spec.ts b/tests/main.spec.ts index 590a380..1a3e4c3 100644 --- a/tests/main.spec.ts +++ b/tests/main.spec.ts @@ -21,6 +21,7 @@ async function launchApp(testInfo: TestInfo, ...options: string[]): Promise<[Ele COMPOSER_MIRROR_PATH_REPOS: '1', // Disable the network so we don't inadvertently test the internet. COMPOSER_DISABLE_NETWORK: '1', + DISPLAY: ':99', }, }); return [app, root];