2022-05-31 12:55:46 +00:00
|
|
|
name: ToT CI
|
|
|
|
|
2022-05-13 12:15:12 +00:00
|
|
|
# Checks Puppeteer against the latest ToT build of Chromium.
|
|
|
|
# Declare default permissions as read only.
|
|
|
|
permissions: read-all
|
|
|
|
|
|
|
|
on:
|
2022-05-13 12:42:20 +00:00
|
|
|
workflow_dispatch:
|
2022-05-13 12:15:12 +00:00
|
|
|
schedule:
|
|
|
|
# * is a special character in YAML so you have to quote this string
|
|
|
|
# Supposed to be every day at 8 am (UTC).
|
|
|
|
- cron: '0 8 * * *'
|
|
|
|
|
2022-10-27 18:35:21 +00:00
|
|
|
# TODO: how to make install & build steps re-usable across jobs.
|
2022-06-10 10:42:29 +00:00
|
|
|
# Currently, the install step is duplicated but should be the same for all jobs.
|
|
|
|
|
2022-05-13 12:15:12 +00:00
|
|
|
jobs:
|
2022-10-17 11:11:53 +00:00
|
|
|
ci:
|
|
|
|
name: ${{ matrix.suite }} tests
|
2022-05-13 12:15:12 +00:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
strategy:
|
2022-10-17 11:11:53 +00:00
|
|
|
fail-fast: false
|
2022-05-13 12:15:12 +00:00
|
|
|
matrix:
|
2022-10-17 11:11:53 +00:00
|
|
|
suite:
|
|
|
|
- chrome-headless
|
|
|
|
- chrome-headful
|
|
|
|
- chrome-new-headless
|
2022-05-13 12:15:12 +00:00
|
|
|
steps:
|
2022-10-06 10:44:45 +00:00
|
|
|
- name: Check out repository
|
|
|
|
uses: actions/checkout@v3.0.2
|
2022-06-10 10:42:29 +00:00
|
|
|
- name: Set up Node.js
|
2022-10-17 12:10:52 +00:00
|
|
|
uses: actions/setup-node@v3.5.1
|
2022-06-10 10:42:29 +00:00
|
|
|
with:
|
2022-10-17 11:11:53 +00:00
|
|
|
cache: npm
|
|
|
|
node-version: latest
|
|
|
|
- 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
|
2022-06-10 10:42:29 +00:00
|
|
|
run: |
|
2022-10-06 08:27:14 +00:00
|
|
|
REV=$(node tools/check_availability.js -p linux)
|
2022-10-17 11:11:53 +00:00
|
|
|
cat packages/puppeteer-core/src/revisions.ts | sed "s/[0-9]\{6,\}/$REV/" > packages/puppeteer-core/src/revisions.ts.replaced
|
|
|
|
mv packages/puppeteer-core/src/revisions.ts.replaced packages/puppeteer-core/src/revisions.ts
|
|
|
|
- name: Rebuild `puppeteer-core`
|
|
|
|
run: npm run build --workspace puppeteer-core
|
|
|
|
- name: Install Chrome
|
|
|
|
run: npm run postinstall --workspace puppeteer
|
|
|
|
- name: Run tests
|
|
|
|
run: xvfb-run --auto-servernum npm run test -- --test-suite ${{ matrix.suite }}
|