chore: fix ToT CI (#9125)
This commit is contained in:
parent
535309feff
commit
618ee743ca
126
.github/workflows/tot-ci.yml
vendored
126
.github/workflows/tot-ci.yml
vendored
@ -15,116 +15,38 @@ on:
|
|||||||
# Currently, the install step is duplicated but should be the same for all jobs.
|
# Currently, the install step is duplicated but should be the same for all jobs.
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
linux-headless:
|
ci:
|
||||||
# https://github.com/actions/virtual-environments#available-environments
|
name: ${{ matrix.suite }} tests
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
strategy:
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
node: [16]
|
suite:
|
||||||
|
- chrome-headless
|
||||||
|
- chrome-headful
|
||||||
|
- chrome-new-headless
|
||||||
steps:
|
steps:
|
||||||
- name: Check out repository
|
- name: Check out repository
|
||||||
uses: actions/checkout@v3.0.2
|
uses: actions/checkout@v3.0.2
|
||||||
with:
|
|
||||||
fetch-depth: 2
|
|
||||||
|
|
||||||
- name: Set up Node.js
|
- name: Set up Node.js
|
||||||
uses: actions/setup-node@v3.4.1
|
uses: actions/setup-node@v3.4.1
|
||||||
with:
|
with:
|
||||||
node-version: ${{ matrix.node }}
|
cache: npm
|
||||||
|
node-version: latest
|
||||||
- name: Install dependencies and build
|
- name: Install dependencies
|
||||||
|
run: npm ci --ignore-scripts
|
||||||
|
- name: Install linux dependencies.
|
||||||
|
run: sudo apt-get install xvfb
|
||||||
|
- name: Build packages
|
||||||
|
run: npm run build
|
||||||
|
- name: Get latest revision
|
||||||
run: |
|
run: |
|
||||||
sudo apt-get install xvfb
|
|
||||||
# Ensure both a Chromium and a Firefox binary are available.
|
|
||||||
PUPPETEER_PRODUCT=firefox npm install
|
|
||||||
npm install
|
|
||||||
ls ~/.cache/puppeteer
|
|
||||||
REV=$(node tools/check_availability.js -p linux)
|
REV=$(node tools/check_availability.js -p linux)
|
||||||
echo "Installing revision $REV"
|
cat packages/puppeteer-core/src/revisions.ts | sed "s/[0-9]\{6,\}/$REV/" > packages/puppeteer-core/src/revisions.ts.replaced
|
||||||
cat src/revisions.ts | sed "s/[0-9]\{6,\}/$REV/" > src/revisions.ts.replaced
|
mv packages/puppeteer-core/src/revisions.ts.replaced packages/puppeteer-core/src/revisions.ts
|
||||||
mv src/revisions.ts.replaced src/revisions.ts
|
- name: Rebuild `puppeteer-core`
|
||||||
npm run build
|
run: npm run build --workspace puppeteer-core
|
||||||
npm install
|
- name: Install Chrome
|
||||||
|
run: npm run postinstall --workspace puppeteer
|
||||||
- name: Run unit tests in headless
|
- name: Run tests
|
||||||
uses: nick-invision/retry@v2
|
run: xvfb-run --auto-servernum npm run test -- --test-suite ${{ matrix.suite }}
|
||||||
with:
|
|
||||||
command: xvfb-run --auto-servernum npm run test:chrome:headless
|
|
||||||
timeout_minutes: 10
|
|
||||||
max_attempts: 3
|
|
||||||
|
|
||||||
linux-headful:
|
|
||||||
# https://github.com/actions/virtual-environments#available-environments
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
node: [16]
|
|
||||||
steps:
|
|
||||||
- name: Check out repository
|
|
||||||
uses: actions/checkout@v3.0.2
|
|
||||||
with:
|
|
||||||
fetch-depth: 2
|
|
||||||
|
|
||||||
- name: Set up Node.js
|
|
||||||
uses: actions/setup-node@v3.4.1
|
|
||||||
with:
|
|
||||||
node-version: ${{ matrix.node }}
|
|
||||||
|
|
||||||
- name: Install dependencies and build
|
|
||||||
run: |
|
|
||||||
sudo apt-get install xvfb
|
|
||||||
# Ensure both a Chromium and a Firefox binary are available.
|
|
||||||
PUPPETEER_PRODUCT=firefox npm install
|
|
||||||
npm install
|
|
||||||
ls ~/.cache/puppeteer
|
|
||||||
REV=$(node tools/check_availability.js -p linux)
|
|
||||||
echo "Installing revision $REV"
|
|
||||||
cat src/revisions.ts | sed "s/[0-9]\{6,\}/$REV/" > src/revisions.ts.replaced
|
|
||||||
mv src/revisions.ts.replaced src/revisions.ts
|
|
||||||
npm run build
|
|
||||||
npm install
|
|
||||||
|
|
||||||
- name: Run unit tests in headful
|
|
||||||
uses: nick-invision/retry@v2
|
|
||||||
with:
|
|
||||||
command: xvfb-run --auto-servernum npm run test:chrome:headful
|
|
||||||
timeout_minutes: 10
|
|
||||||
max_attempts: 3
|
|
||||||
|
|
||||||
linux-chrome-headless:
|
|
||||||
# https://github.com/actions/virtual-environments#available-environments
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
node: [16]
|
|
||||||
steps:
|
|
||||||
- name: Check out repository
|
|
||||||
uses: actions/checkout@v3.0.2
|
|
||||||
with:
|
|
||||||
fetch-depth: 2
|
|
||||||
|
|
||||||
- name: Set up Node.js
|
|
||||||
uses: actions/setup-node@v3.4.1
|
|
||||||
with:
|
|
||||||
node-version: ${{ matrix.node }}
|
|
||||||
|
|
||||||
- name: Install dependencies and build
|
|
||||||
run: |
|
|
||||||
sudo apt-get install xvfb
|
|
||||||
# Ensure both a Chromium and a Firefox binary are available.
|
|
||||||
PUPPETEER_PRODUCT=firefox npm install
|
|
||||||
npm install
|
|
||||||
ls ~/.cache/puppeteer
|
|
||||||
REV=$(node tools/check_availability.js -p linux)
|
|
||||||
echo "Installing revision $REV"
|
|
||||||
cat src/revisions.ts | sed "s/[0-9]\{6,\}/$REV/" > src/revisions.ts.replaced
|
|
||||||
mv src/revisions.ts.replaced src/revisions.ts
|
|
||||||
npm run build
|
|
||||||
npm install
|
|
||||||
|
|
||||||
- name: Run unit tests in chrome headless
|
|
||||||
uses: nick-invision/retry@v2
|
|
||||||
with:
|
|
||||||
command: xvfb-run --auto-servernum npm run test:chrome:headless-chrome
|
|
||||||
timeout_minutes: 10
|
|
||||||
max_attempts: 3
|
|
||||||
|
@ -18,7 +18,7 @@
|
|||||||
const assert = require('assert');
|
const assert = require('assert');
|
||||||
const https = require('https');
|
const https = require('https');
|
||||||
const BrowserFetcher =
|
const BrowserFetcher =
|
||||||
require('../lib/cjs/puppeteer/node/BrowserFetcher.js').BrowserFetcher;
|
require('puppeteer-core/internal/node/BrowserFetcher.js').BrowserFetcher;
|
||||||
|
|
||||||
const SUPPORTED_PLATFORMS = ['linux', 'mac', 'mac_arm', 'win32', 'win64'];
|
const SUPPORTED_PLATFORMS = ['linux', 'mac', 'mac_arm', 'win32', 'win64'];
|
||||||
|
|
||||||
@ -213,7 +213,8 @@ async function checkRollCandidate(channel) {
|
|||||||
10
|
10
|
||||||
);
|
);
|
||||||
const currentRevision = parseInt(
|
const currentRevision = parseInt(
|
||||||
require('../lib/cjs/puppeteer/revisions.js').PUPPETEER_REVISIONS.chromium,
|
require('puppeteer-core/internal/revisions.js').PUPPETEER_REVISIONS
|
||||||
|
.chromium,
|
||||||
10
|
10
|
||||||
);
|
);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user