Skip to content

Commit 93607b1

Browse files
authored
Merge pull request #7700 from plotly/pin-chrome-version-in-noci
Adjust Chrome flags in CI to fix broken jobs
2 parents a6a10f9 + e22bfd2 commit 93607b1

File tree

2 files changed

+18
-4
lines changed

2 files changed

+18
-4
lines changed

.github/workflows/test.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,20 @@ jobs:
1515
node-version: [18.x]
1616

1717
steps:
18-
- uses: browser-actions/setup-chrome@v1
18+
- uses: browser-actions/setup-chrome@v2
19+
id: setup-chrome
1920
- uses: actions/checkout@v4
2021
- name: Use Node.js ${{ matrix.node-version }}
2122
uses: actions/setup-node@v4
2223
with:
2324
node-version: ${{ matrix.node-version }}
2425
cache: 'npm'
25-
- run: chrome --version
26+
- name: Set Chrome binary path
27+
run: echo "CHROME_BIN=${{ steps.setup-chrome.outputs.chrome-path }}" >> $GITHUB_ENV
28+
- name: Verify Chrome version
29+
run: |
30+
echo "Chrome path: $CHROME_BIN"
31+
$CHROME_BIN --version
2632
- run: ls
2733
- run: npm run pretest
2834
- run: npm ci

test/jasmine/karma.conf.js

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -253,14 +253,22 @@ func.defaultConfig = {
253253
//
254254
// window-size values came from observing default size
255255
//
256-
// '--ignore-gpu-blacklist' allow to test WebGL on CI (!!!)
256+
// '--ignore-gpu-blocklist' allow to test WebGL on CI (!!!)
257257
customLaunchers: {
258258
_Chrome: {
259259
base: 'Chrome',
260260
flags: [
261261
'--touch-events',
262262
'--window-size=' + argv.width + ',' + argv.height,
263-
isCI ? '--ignore-gpu-blacklist' : '',
263+
isCI ? '--ignore-gpu-blocklist' : '',
264+
// The following two flags are needed only for the "NoCI" tests which run in GitHub Actions.
265+
// The first is needed because the GPU is not available to those runners,
266+
// and therefore we need to use SwiftShader instead (which is disabled by default as of Jan 2026,
267+
// hence the need for a flag to manually enable it).
268+
// The second flag is needed because the Chrome browser installed by the CI job runner
269+
// fails without it.
270+
isCI && process.env.GITHUB_ACTIONS ? '--enable-unsafe-swiftshader' : '',
271+
isCI && process.env.GITHUB_ACTIONS ? '--no-sandbox' : '',
264272
isBundleTest && basename(testFileGlob) === 'no_webgl' ? '--disable-webgl' : ''
265273
]
266274
},

0 commit comments

Comments
 (0)