Skip to content

Commit fd9d274

Browse files
authored
Testing: disable puppeteer/chrome sandbox in Github Actions for Ubuntu 24.04 (#1657)
--disable-setuid-sandbox deemed acceptable by Yun as it's for Github Actions only
1 parent 6f4e691 commit fd9d274

File tree

8 files changed

+16
-6
lines changed

8 files changed

+16
-6
lines changed

.changeset/famous-bobcats-push.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
---
2+
---

.github/workflows/ci-cd.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ jobs:
99
name: Tests
1010
permissions:
1111
contents: read
12-
runs-on: ubuntu-22.04
12+
runs-on: ubuntu-latest
1313
steps:
1414
- name: Checkout Repo
1515
uses: actions/checkout@v3

packages/all/test/utils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ export async function launchPuppeteer(
2424
width: 1920,
2525
height: 1080,
2626
},
27-
args: ['--no-sandbox'],
27+
args: ['--no-sandbox', '--disable-setuid-sandbox'],
2828
...options,
2929
});
3030
}

packages/plugins/rrweb-plugin-console-record/test/index.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ export async function launchPuppeteer(
1414
width: 1920,
1515
height: 1080,
1616
},
17-
args: ['--no-sandbox'],
17+
args: ['--no-sandbox', '--disable-setuid-sandbox'],
1818
...options,
1919
});
2020
}

packages/rrdom/test/diff.test.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1413,7 +1413,9 @@ describe('diff algorithm for rrdom', () => {
14131413
* If the selector match is case insensitive, it will cause some CSS style problems in the replayer.
14141414
* This test result executed in JSDom is different from that in real browser so we use puppeteer as test environment.
14151415
*/
1416-
const browser = await puppeteer.launch();
1416+
const browser = await puppeteer.launch({
1417+
args: ['--no-sandbox', '--disable-setuid-sandbox'],
1418+
});
14171419
const page = await browser.newPage();
14181420
await page.goto('about:blank');
14191421

packages/rrdom/test/virtual-dom.test.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,9 @@ describe('RRDocument for browser environment', () => {
242242
let page: puppeteer.Page;
243243

244244
beforeAll(async () => {
245-
browser = await puppeteer.launch();
245+
browser = await puppeteer.launch({
246+
args: ['--no-sandbox', '--disable-setuid-sandbox'],
247+
});
246248
code = fs.readFileSync(
247249
path.resolve(__dirname, '../dist/rrdom.umd.cjs'),
248250
'utf8',

packages/rrweb-snapshot/test/integration.test.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,7 @@ describe('integration tests', function (this: ISuite) {
103103
serverURL = getServerURL(server);
104104
browser = await puppeteer.launch({
105105
// headless: false,
106+
args: ['--no-sandbox', '--disable-setuid-sandbox'],
106107
});
107108

108109
code = fs.readFileSync(
@@ -435,6 +436,7 @@ describe('iframe integration tests', function (this: ISuite) {
435436
serverURL = getServerURL(server);
436437
browser = await puppeteer.launch({
437438
// headless: false,
439+
args: ['--no-sandbox', '--disable-setuid-sandbox'],
438440
});
439441

440442
code = fs.readFileSync(
@@ -479,6 +481,7 @@ describe('dialog integration tests', function (this: ISuite) {
479481
serverURL = getServerURL(server);
480482
browser = await puppeteer.launch({
481483
// headless: false,
484+
args: ['--no-sandbox', '--disable-setuid-sandbox'],
482485
});
483486

484487
code = fs.readFileSync(
@@ -525,6 +528,7 @@ describe('shadow DOM integration tests', function (this: ISuite) {
525528
serverURL = getServerURL(server);
526529
browser = await puppeteer.launch({
527530
// headless: false,
531+
args: ['--no-sandbox', '--disable-setuid-sandbox'],
528532
});
529533

530534
code = fs.readFileSync(

packages/rrweb/test/utils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ export async function launchPuppeteer(
2626
width: 1920,
2727
height: 1080,
2828
},
29-
args: ['--no-sandbox'],
29+
args: ['--no-sandbox', '--disable-setuid-sandbox'],
3030
...options,
3131
});
3232
}

0 commit comments

Comments
 (0)