Skip to content

Commit 3092cb3

Browse files
Update puppeteer
1 parent bfaa4cb commit 3092cb3

3 files changed

Lines changed: 103 additions & 156 deletions

File tree

.github/workflows/ci-cd.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ on:
88
branches:
99
- '*'
1010

11+
env:
12+
CHROME_BIN: /usr/bin/google-chrome-stable
13+
1114
concurrency:
1215
group: ${{ github.workflow }}-${{ github.event_name == 'push' && github.run_number || github.event.pull_request.number }}
1316
cancel-in-progress: true
@@ -40,6 +43,8 @@ jobs:
4043

4144
- name: npm ci
4245
run: npm ci
46+
env:
47+
PUPPETEER_SKIP_DOWNLOAD: 'true'
4348

4449
- name: npm ts tests
4550
run: npm run test-ts-decls

karma/config.js

Lines changed: 7 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
'use strict';
2-
// Comment the next two lines if you want to run with Chrome instead of Chromium
3-
const puppeteer = require('puppeteer');
4-
process.env.CHROME_BIN = puppeteer.executablePath();
2+
// Use CHROME_BIN env var if set (e.g., in CI), otherwise fall back to Puppeteer's bundled Chromium
3+
if (!process.env.CHROME_BIN) {
4+
const puppeteer = require('puppeteer');
5+
process.env.CHROME_BIN = puppeteer.executablePath();
6+
}
57

68
const NodePolyfillPlugin = require('node-polyfill-webpack-plugin');
79

@@ -18,8 +20,7 @@ module.exports = {
1820
customLaunchers: {
1921
ChromeHeadlessNoSandbox: {
2022
base: 'ChromeHeadless',
21-
// Flags required to run in ubuntu-22.04 or above (https://chromium.googlesource.com/chromium/src/+/master/docs/linux/suid_sandbox_development.md)
22-
flags: ['--no-sandbox', '--disable-setuid-sandbox']
23+
flags: ['--no-sandbox', '--disable-setuid-sandbox', '--headless=new']
2324
}
2425
},
2526
browsers: ['ChromeHeadlessNoSandbox'],
@@ -29,21 +30,7 @@ module.exports = {
2930
// Uncomment to run a particular UT:
3031
// '**/listeners/__tests__/browser.spec.js',
3132
// Run browser UTs. Commons and Node UTs run with `test-node` npm script
32-
'*/**/__tests__/**/browser.spec.js',
33-
{
34-
pattern: 'engine/__tests__/engine/mocks/murmur3*.csv',
35-
watched: false,
36-
included: false,
37-
served: true,
38-
nocache: true
39-
},
40-
{
41-
pattern: 'engine/__tests__/matchers/mocks/regex.txt',
42-
watched: false,
43-
included: false,
44-
served: true,
45-
nocache: true
46-
}
33+
'*/**/__tests__/**/browser.spec.js'
4734
],
4835

4936
// list of files / patterns to exclude

0 commit comments

Comments
 (0)