mirror of
https://github.com/hanzoai/puppeteer.git
synced 2026-09-24 17:02:14 +00:00
test: add bisect workflow (#15233)
This commit is contained in:
@@ -0,0 +1,80 @@
|
||||
name: Bisect Chrome for Testing
|
||||
|
||||
permissions: read-all
|
||||
|
||||
concurrency:
|
||||
group: bisect-${{ github.head_ref || github.run_id }}
|
||||
cancel-in-progress: true
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
script:
|
||||
description: Path to a script or test name to bisect (e.g. test:chrome:headless)
|
||||
required: true
|
||||
type: string
|
||||
default: 'test:chrome:headless'
|
||||
tests:
|
||||
description: Tests to run (e.g. '[network.spec] *')
|
||||
required: false
|
||||
type: string
|
||||
good:
|
||||
description: Last known good version (e.g. 152.0.7946.0)
|
||||
required: true
|
||||
type: string
|
||||
bad:
|
||||
description: First known bad version (e.g. 152.0.7942.0)
|
||||
required: true
|
||||
type: string
|
||||
cft:
|
||||
description: Use Chrome for Testing (-cft)
|
||||
required: false
|
||||
type: boolean
|
||||
default: true
|
||||
os:
|
||||
description: On which OS to run?
|
||||
required: true
|
||||
type: choice
|
||||
options:
|
||||
- ubuntu-latest
|
||||
- windows-latest
|
||||
- macos-15
|
||||
default: ubuntu-latest
|
||||
|
||||
jobs:
|
||||
bisect:
|
||||
name: Bisect on ${{ inputs.os }}
|
||||
runs-on: ${{ inputs.os }}
|
||||
steps:
|
||||
- name: Check out repository
|
||||
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
|
||||
- name: Set up Node.js
|
||||
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
|
||||
with:
|
||||
cache: npm
|
||||
node-version-file: '.nvmrc'
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: '3.11'
|
||||
- name: Disable AppArmor
|
||||
if: ${{ inputs.os == 'ubuntu-latest' }}
|
||||
run: echo 0 | sudo tee /proc/sys/kernel/apparmor_restrict_unprivileged_userns
|
||||
- name: Install dependencies
|
||||
run: npm ci
|
||||
env:
|
||||
PUPPETEER_SKIP_DOWNLOAD: true
|
||||
- name: Build packages
|
||||
run: npm run build
|
||||
- name: Run bisect (Non-Linux)
|
||||
if: ${{ inputs.os != 'ubuntu-latest' }}
|
||||
run: npx @puppeteer/browsers bisect ${{ inputs.script }} -g ${{ inputs.good }} -b ${{ inputs.bad }} ${{ inputs.cft && '--cft' || '--no-cft' }}
|
||||
env:
|
||||
PUPPETEER_DEFLAKE_TESTS: '${{ inputs.tests }}'
|
||||
PUPPETEER_DEFLAKE_RETRIES: 3
|
||||
- name: Run bisect (Linux)
|
||||
if: ${{ inputs.os == 'ubuntu-latest' }}
|
||||
run: xvfb-run --auto-servernum npx @puppeteer/browsers bisect ${{ inputs.script }} -g ${{ inputs.good }} -b ${{ inputs.bad }} ${{ inputs.cft && '--cft' || '--no-cft' }}
|
||||
env:
|
||||
PUPPETEER_DEFLAKE_TESTS: '${{ inputs.tests }}'
|
||||
PUPPETEER_DEFLAKE_RETRIES: 3
|
||||
Reference in New Issue
Block a user