From a762dbe96f80cf18d31294625ff79f52dee7f0f2 Mon Sep 17 00:00:00 2001 From: Andrey Lushnikov Date: Wed, 6 Feb 2019 14:28:02 -0800 Subject: [PATCH] chore(ci): add Puppeteer-Firefox to CI (#3932) This patch adds Puppeteer-Firefox bot running on Linux+Node8 on Cirrus CI. References #3889 --- .cirrus.yml | 15 ++++++++++++--- experimental/puppeteer-firefox/lib/Launcher.js | 7 ++++++- experimental/puppeteer-firefox/package.json | 2 +- 3 files changed, 19 insertions(+), 5 deletions(-) diff --git a/.cirrus.yml b/.cirrus.yml index 82b078606ec..aaba646fd01 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -3,7 +3,7 @@ env: task: matrix: - - name: node6 (linux) + - name: Chromium (node6 + linux) container: dockerfile: .ci/node6/Dockerfile.linux xvfb_start_background_script: Xvfb :99 -ac -screen 0 1024x768x24 @@ -12,7 +12,7 @@ task: task: matrix: - - name: node8 (linux) + - name: Chromium (node8 + linux) container: dockerfile: .ci/node8/Dockerfile.linux xvfb_start_background_script: Xvfb :99 -ac -screen 0 1024x768x24 @@ -22,10 +22,19 @@ task: test_doclint_script: npm run test-doclint test_types_script: npm run test-types +task: + matrix: + - name: Firefox (node8 + linux) + container: + dockerfile: .ci/node8/Dockerfile.linux + xvfb_start_background_script: Xvfb :99 -ac -screen 0 1024x768x24 + install_script: npm install --unsafe-perm && cd experimental/puppeteer-firefox && npm install --unsafe-perm + test_script: npm run funit + task: osx_instance: image: high-sierra-base - name: node8 (macOS) + name: Chromium (node8 + macOS) env: HOMEBREW_NO_AUTO_UPDATE: 1 node_install_script: diff --git a/experimental/puppeteer-firefox/lib/Launcher.js b/experimental/puppeteer-firefox/lib/Launcher.js index 6734f2317e2..d3d0e24d22e 100644 --- a/experimental/puppeteer-firefox/lib/Launcher.js +++ b/experimental/puppeteer-firefox/lib/Launcher.js @@ -79,7 +79,12 @@ class Launcher { // process group, making it possible to kill child process tree with `.kill(-pid)` command. // @see https://nodejs.org/api/child_process.html#child_process_options_detached detached: process.platform !== 'win32', - stdio + stdio, + // On linux Juggler ships the libstdc++ it was linked against. + env: os.platform() === 'linux' ? { + ...process.env, + LD_LIBRARY_PATH: `${path.dirname(executablePath)}:${process.env.LD_LIBRARY_PATH}`, + } : process.env, } ); diff --git a/experimental/puppeteer-firefox/package.json b/experimental/puppeteer-firefox/package.json index 112440e3ba9..b531321efee 100644 --- a/experimental/puppeteer-firefox/package.json +++ b/experimental/puppeteer-firefox/package.json @@ -9,7 +9,7 @@ "node": ">=8.9.4" }, "puppeteer": { - "firefox_revision": "d026cf7a14cb7dbe65acc4a4188c570da10a501c" + "firefox_revision": "74896383109c18e133bd317b7b2959ae2376f51d" }, "scripts": { "install": "node install.js",