From de6821a1de6574b1aa987944fe9a5f0b5f7724bb Mon Sep 17 00:00:00 2001 From: Yuichiro Yamashita Date: Sat, 31 Dec 2022 10:13:52 +0900 Subject: [PATCH] [ chore] disable puppeteer on Linux for Node8 and 10 (#8155) --- .github/workflows/ci.yml | 10 ++++++++++ test/custom-elements/index.ts | 3 +++ test/runtime-puppeteer/index.ts | 3 +++ 3 files changed, 16 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index bd826cafca..e24f106477 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -59,6 +59,16 @@ jobs: id: download-artifact with: name: build-assets + - name: Get Node version ${{ runner.os }} + run: echo "NODE_VERSION=`node --version`" >> $GITHUB_ENV + if: runner.os != 'Windows' + - name: Get Node version ${{ runner.os }} + run: | + chcp 65001 + echo ("NODE_VERSION=$(node --version)") >> $env:GITHUB_ENV + if: runner.os == 'Windows' + - run: npm install --save-dev puppeteer@13 + if: ${{ runner.os == 'Linux' && (!startsWith(env.NODE_VERSION, 'v8.') && !startsWith(env.NODE_VERSION, 'v10.')) }} - run: npm install env: SKIP_PREPARE: true diff --git a/test/custom-elements/index.ts b/test/custom-elements/index.ts index 42b27eebd3..534199d035 100644 --- a/test/custom-elements/index.ts +++ b/test/custom-elements/index.ts @@ -64,6 +64,9 @@ describe('custom-elements', function() { fs.readdirSync(`${__dirname}/samples`).forEach(dir => { if (dir[0] === '.') return; + // MEMO: puppeteer can not execute Chromium properly with Node8,10 on Linux at GitHub actions. + const { version } = process; + if ((version.startsWith('v8.') || version.startsWith('v10.')) && process.platform === 'linux') return; const solo = /\.solo$/.test(dir); const skip = /\.skip$/.test(dir); diff --git a/test/runtime-puppeteer/index.ts b/test/runtime-puppeteer/index.ts index 62952ad9f7..eba60544f6 100644 --- a/test/runtime-puppeteer/index.ts +++ b/test/runtime-puppeteer/index.ts @@ -77,6 +77,9 @@ describe('runtime (puppeteer)', function() { function runTest(dir, hydrate) { if (dir[0] === '.') return; + // MEMO: puppeteer can not execute Chromium properly with Node8,10 on Linux at GitHub actions. + const { version } = process; + if ((version.startsWith('v8.') || version.startsWith('v10.')) && process.platform === 'linux') return; const config = loadConfig(`${__dirname}/samples/${dir}/_config.js`); const solo = config.solo || /\.solo/.test(dir);