diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 5db9c2d67d8..93caad4a454 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -15,14 +15,20 @@ jobs: node-version: [18.x] steps: - - uses: browser-actions/setup-chrome@v1 + - uses: browser-actions/setup-chrome@v2 + id: setup-chrome - uses: actions/checkout@v4 - name: Use Node.js ${{ matrix.node-version }} uses: actions/setup-node@v4 with: node-version: ${{ matrix.node-version }} cache: 'npm' - - run: chrome --version + - name: Set Chrome binary path + run: echo "CHROME_BIN=${{ steps.setup-chrome.outputs.chrome-path }}" >> $GITHUB_ENV + - name: Verify Chrome version + run: | + echo "Chrome path: $CHROME_BIN" + $CHROME_BIN --version - run: ls - run: npm run pretest - run: npm ci diff --git a/test/jasmine/karma.conf.js b/test/jasmine/karma.conf.js index c82cc9bfba6..2c7f075c3ee 100644 --- a/test/jasmine/karma.conf.js +++ b/test/jasmine/karma.conf.js @@ -253,14 +253,22 @@ func.defaultConfig = { // // window-size values came from observing default size // - // '--ignore-gpu-blacklist' allow to test WebGL on CI (!!!) + // '--ignore-gpu-blocklist' allow to test WebGL on CI (!!!) customLaunchers: { _Chrome: { base: 'Chrome', flags: [ '--touch-events', '--window-size=' + argv.width + ',' + argv.height, - isCI ? '--ignore-gpu-blacklist' : '', + isCI ? '--ignore-gpu-blocklist' : '', + // The following two flags are needed only for the "NoCI" tests which run in GitHub Actions. + // The first is needed because the GPU is not available to those runners, + // and therefore we need to use SwiftShader instead (which is disabled by default as of Jan 2026, + // hence the need for a flag to manually enable it). + // The second flag is needed because the Chrome browser installed by the CI job runner + // fails without it. + isCI && process.env.GITHUB_ACTIONS ? '--enable-unsafe-swiftshader' : '', + isCI && process.env.GITHUB_ACTIONS ? '--no-sandbox' : '', isBundleTest && basename(testFileGlob) === 'no_webgl' ? '--disable-webgl' : '' ] },