puppeteer/.github/workflows/tot.yml
dependabot[bot] a8a08a8441
chore(deps): bump actions/setup-node from 3.1.1 to 3.2.0 (#8357)
Bumps [actions/setup-node](https://github.com/actions/setup-node) from 3.1.1 to 3.2.0.
- [Release notes](https://github.com/actions/setup-node/releases)
- [Commits](https://github.com/actions/setup-node/compare/v3.1.1...v3.2.0)

---
updated-dependencies:
- dependency-name: actions/setup-node
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-05-24 08:00:11 +00:00

75 lines
2.1 KiB
YAML

name: run-tot-checks
# Checks Puppeteer against the latest ToT build of Chromium.
# Declare default permissions as read only.
permissions: read-all
on:
workflow_dispatch:
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 * * *'
jobs:
linux-tot-checks:
# https://github.com/actions/virtual-environments#available-environments
runs-on: ubuntu-latest
strategy:
matrix:
node: [16]
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 2
- name: Set up Node.js
uses: actions/setup-node@v3.2.0
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 .local-chromium .local-firefox
REV=$(node utils/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 headless
uses: nick-invision/retry@v2
env:
CHROMIUM: true
HEADLESS: true
with:
max_attempts: 3
command: xvfb-run --auto-servernum npm run unit
timeout_minutes: 10
- name: Run unit tests in headful
uses: nick-invision/retry@v2
continue-on-error: true
env:
CHROMIUM: true
HEADLESS: false
with:
max_attempts: 3
command: xvfb-run --auto-servernum npm run unit
timeout_minutes: 10
- name: Run unit tests in chrome headless
uses: nick-invision/retry@v2
continue-on-error: true
env:
CHROMIUM: true
with:
max_attempts: 3
command: xvfb-run --auto-servernum npm run chrome-headless-unit
timeout_minutes: 10