Skip to content

chore(main): release chromium-bidi 0.11.0 #5251

chore(main): release chromium-bidi 0.11.0

chore(main): release chromium-bidi 0.11.0 #5251

Workflow file for this run

name: Puppeteer CI
# Declare default permissions as read only.
permissions: read-all
on:
pull_request:
types:
# These are the defaults. See
# https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#pull_request
- opened
- reopened
- synchronize
# Used for `puppeteer`
- labeled
workflow_dispatch:
concurrency:
group: puppeteer-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
puppeteer-test:
name: Run Puppeteer tests (${{ matrix.shard }})
runs-on: ubuntu-latest
if: contains(github.event.pull_request.labels.*.name, 'puppeteer')
strategy:
fail-fast: false
matrix:
shard:
- 1-4
- 2-4
- 3-4
- 4-4
steps:
- name: Checkout Chromium-BiDi
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
path: 'bidi'
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
repository: 'puppeteer/puppeteer'
path: 'puppeteer'
- name: Set up Node.js
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
with:
node-version-file: './bidi/.nvmrc'
cache-dependency-path: 'puppeteer/package-lock.json,bidi/package-lock.json'
- uses: google/wireit@83d7f8bed70b7bcfc40f4b9f54f4b7485753991b # setup-github-actions-caching/v2.0.1
- name: Install Chromium-BiDi dependencies
working-directory: bidi
run: npm ci
env:
PUPPETEER_SKIP_DOWNLOAD: true
- name: Build Chromium-BiDi
working-directory: bidi
run: |
npm run build
- name: Link Chromium-BiDi
working-directory: bidi
run: npm link
- name: Install Puppeteer dependencies
working-directory: puppeteer
run: npm ci
# We need to build Puppeteer first to not hit devtools protocol dep issue
- name: Build Puppeteer
working-directory: puppeteer
run: npm run build
- name: Install Chromium-BiDi
working-directory: puppeteer
run: |
npm link chromium-bidi -w puppeteer-core
- name: Delete the downloaded version (https://github.com/npm/cli/issues/7315)
working-directory: puppeteer
run: |
rm packages/puppeteer-core/node_modules/chromium-bidi -r
# Install chrome, chromedriver and headless shell is required to keep them cached.
- name: Install all chrome binaries if needed
uses: ./bidi/.github/actions/setup-chrome-binaries
with:
working-directory: bidi
- name: Install pinned browser
id: browser
working-directory: bidi
run: node tools/install-browser.mjs --github
- name: Run tests
working-directory: puppeteer
env:
PUPPETEER_EXECUTABLE_PATH: ${{ steps.browser.outputs.executablePath }}
run: xvfb-run --auto-servernum npm run test:chrome:bidi -- --shard '${{ matrix.shard }}'
puppeteer-test-required:
name: '[Required] Puppeteer tests'
needs: [puppeteer-test]
runs-on: ubuntu-latest
if: ${{ always() }}
steps:
- if: ${{ needs.puppeteer-test.result != 'success' && contains(github.event.pull_request.labels.*.name, 'puppeteer-required') }}
run: 'exit 1'
- run: 'exit 0'