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
This commit is contained in:
2
.changeset/famous-bobcats-push.md
Normal file
2
.changeset/famous-bobcats-push.md
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
---
|
||||||
|
---
|
||||||
2
.github/workflows/ci-cd.yml
vendored
2
.github/workflows/ci-cd.yml
vendored
@@ -9,7 +9,7 @@ jobs:
|
|||||||
name: Tests
|
name: Tests
|
||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: read
|
||||||
runs-on: ubuntu-22.04
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout Repo
|
- name: Checkout Repo
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ export async function launchPuppeteer(
|
|||||||
width: 1920,
|
width: 1920,
|
||||||
height: 1080,
|
height: 1080,
|
||||||
},
|
},
|
||||||
args: ['--no-sandbox'],
|
args: ['--no-sandbox', '--disable-setuid-sandbox'],
|
||||||
...options,
|
...options,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ export async function launchPuppeteer(
|
|||||||
width: 1920,
|
width: 1920,
|
||||||
height: 1080,
|
height: 1080,
|
||||||
},
|
},
|
||||||
args: ['--no-sandbox'],
|
args: ['--no-sandbox', '--disable-setuid-sandbox'],
|
||||||
...options,
|
...options,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1413,7 +1413,9 @@ describe('diff algorithm for rrdom', () => {
|
|||||||
* If the selector match is case insensitive, it will cause some CSS style problems in the replayer.
|
* If the selector match is case insensitive, it will cause some CSS style problems in the replayer.
|
||||||
* This test result executed in JSDom is different from that in real browser so we use puppeteer as test environment.
|
* This test result executed in JSDom is different from that in real browser so we use puppeteer as test environment.
|
||||||
*/
|
*/
|
||||||
const browser = await puppeteer.launch();
|
const browser = await puppeteer.launch({
|
||||||
|
args: ['--no-sandbox', '--disable-setuid-sandbox'],
|
||||||
|
});
|
||||||
const page = await browser.newPage();
|
const page = await browser.newPage();
|
||||||
await page.goto('about:blank');
|
await page.goto('about:blank');
|
||||||
|
|
||||||
|
|||||||
@@ -242,7 +242,9 @@ describe('RRDocument for browser environment', () => {
|
|||||||
let page: puppeteer.Page;
|
let page: puppeteer.Page;
|
||||||
|
|
||||||
beforeAll(async () => {
|
beforeAll(async () => {
|
||||||
browser = await puppeteer.launch();
|
browser = await puppeteer.launch({
|
||||||
|
args: ['--no-sandbox', '--disable-setuid-sandbox'],
|
||||||
|
});
|
||||||
code = fs.readFileSync(
|
code = fs.readFileSync(
|
||||||
path.resolve(__dirname, '../dist/rrdom.umd.cjs'),
|
path.resolve(__dirname, '../dist/rrdom.umd.cjs'),
|
||||||
'utf8',
|
'utf8',
|
||||||
|
|||||||
@@ -103,6 +103,7 @@ describe('integration tests', function (this: ISuite) {
|
|||||||
serverURL = getServerURL(server);
|
serverURL = getServerURL(server);
|
||||||
browser = await puppeteer.launch({
|
browser = await puppeteer.launch({
|
||||||
// headless: false,
|
// headless: false,
|
||||||
|
args: ['--no-sandbox', '--disable-setuid-sandbox'],
|
||||||
});
|
});
|
||||||
|
|
||||||
code = fs.readFileSync(
|
code = fs.readFileSync(
|
||||||
@@ -435,6 +436,7 @@ describe('iframe integration tests', function (this: ISuite) {
|
|||||||
serverURL = getServerURL(server);
|
serverURL = getServerURL(server);
|
||||||
browser = await puppeteer.launch({
|
browser = await puppeteer.launch({
|
||||||
// headless: false,
|
// headless: false,
|
||||||
|
args: ['--no-sandbox', '--disable-setuid-sandbox'],
|
||||||
});
|
});
|
||||||
|
|
||||||
code = fs.readFileSync(
|
code = fs.readFileSync(
|
||||||
@@ -479,6 +481,7 @@ describe('dialog integration tests', function (this: ISuite) {
|
|||||||
serverURL = getServerURL(server);
|
serverURL = getServerURL(server);
|
||||||
browser = await puppeteer.launch({
|
browser = await puppeteer.launch({
|
||||||
// headless: false,
|
// headless: false,
|
||||||
|
args: ['--no-sandbox', '--disable-setuid-sandbox'],
|
||||||
});
|
});
|
||||||
|
|
||||||
code = fs.readFileSync(
|
code = fs.readFileSync(
|
||||||
@@ -525,6 +528,7 @@ describe('shadow DOM integration tests', function (this: ISuite) {
|
|||||||
serverURL = getServerURL(server);
|
serverURL = getServerURL(server);
|
||||||
browser = await puppeteer.launch({
|
browser = await puppeteer.launch({
|
||||||
// headless: false,
|
// headless: false,
|
||||||
|
args: ['--no-sandbox', '--disable-setuid-sandbox'],
|
||||||
});
|
});
|
||||||
|
|
||||||
code = fs.readFileSync(
|
code = fs.readFileSync(
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ export async function launchPuppeteer(
|
|||||||
width: 1920,
|
width: 1920,
|
||||||
height: 1080,
|
height: 1080,
|
||||||
},
|
},
|
||||||
args: ['--no-sandbox'],
|
args: ['--no-sandbox', '--disable-setuid-sandbox'],
|
||||||
...options,
|
...options,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user