Skip to content

build(chrome): update the pinned browser version #6464

build(chrome): update the pinned browser version

build(chrome): update the pinned browser version #6464

Workflow file for this run

# This workflow will check out wpt and run the WebDriver BiDi tests against our
# implementation.
name: WPT detailed
# Declare default permissions as read only.
permissions: read-all
env:
DEBUG: 'bidi:server:*,bidi:mapper:*'
DEBUG_DEPTH: 10
FORCE_COLOR: 3
PIP_DISABLE_PIP_VERSION_CHECK: 1
on:
push:
branches: 'main'
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 `update-expectations`
- labeled
workflow_dispatch:
inputs:
auto-commit:
description: Auto-commit expectations
default: false
required: false
type: boolean
tests:
description: Tests to run (e.g. 'network/combined/')
required: false
type: string
verbose:
description: Verbose logging
default: false
required: false
type: boolean
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
wpt-report:
name: WPT report
needs: wpt
if: ${{ github.ref == 'refs/heads/main' }}
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write
steps:
- uses: actions/download-artifact@9c19ed7fe5d278cd354c7dfd5d3b88589c7e2395 # v4.1.6
with:
name: chromedriver-headful-artifacts
- name: Prepare Pages
run: |
mkdir -p out/site
cp out/wptreport.json out/site/wptreport.json
cp out/wptreport.html out/site/index.html
cp out/wptreport-2023.html out/site/2023.html
- name: Setup Pages
uses: actions/configure-pages@983d7736d9b0ae728b81ab479565c72886d7745b # v5.0.0
- name: Upload Pages artifact
uses: actions/upload-pages-artifact@56afc609e74202658d3ffba0e8f6dda462b719fa # v3.0.1
with:
path: out/site
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@d6db90164ac5ed86f2b6aed7e0febac5b3c0c03e # v4.0.5
wpt-auto-commit:
name: WPT auto-commit expectations
needs: wpt
if: ${{ !cancelled() && (github.event.inputs.auto-commit == 'true' || contains(github.event.pull_request.labels.*.name, 'update-expectations')) }}
# Needed to remove the label to prevent a loop
permissions:
pull-requests: write
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@1d96c772d19495a3b5c517cd2bc0cb401ea0529f # v4.1.3
with:
token: ${{ secrets.BROWSER_AUTOMATION_BOT_TOKEN }}
- run: rm -rf wpt-metadata/chromedriver/headless/*
- run: rm -rf wpt-metadata/chromedriver/headful/*
- run: rm -rf wpt-metadata/mapper/headless/*
- uses: actions/download-artifact@9c19ed7fe5d278cd354c7dfd5d3b88589c7e2395 # v4.1.6
with:
name: chromedriver-headless-wpt-metadata
path: wpt-metadata/chromedriver/headless
- uses: actions/download-artifact@9c19ed7fe5d278cd354c7dfd5d3b88589c7e2395 # v4.1.6
with:
name: chromedriver-headful-wpt-metadata
path: wpt-metadata/chromedriver/headful
- uses: actions/download-artifact@9c19ed7fe5d278cd354c7dfd5d3b88589c7e2395 # v4.1.6
with:
name: mapper-headless-wpt-metadata
path: wpt-metadata/mapper/headless
- run: gh pr edit "$NUMBER" --remove-label "update-expectations"
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GH_REPO: ${{ github.repository }}
NUMBER: ${{ github.event.pull_request.number }}
- name: Auto-commit WPT expectations
if: success() || failure()
uses: stefanzweifel/git-auto-commit-action@8621497c8c39c72f3e2a999a26b4ca1b5058a842 # v5.0.1
with:
commit_message: Update WPT expectations
commit_options: -n --signoff
commit_user_name: Browser Automation Bot
commit_user_email: [email protected]
commit_author: Browser Automation Bot <[email protected]>
file_pattern: 'wpt-metadata/**/*.ini'
wpt:
name: ${{ matrix.kind }}-${{ matrix.head }}
runs-on: ubuntu-latest
if: ${{ github.ref == 'refs/heads/main' || contains(github.event.pull_request.labels.*.name, 'update-expectations') || github.event_name == 'workflow_dispatch' }}
strategy:
fail-fast: false
matrix:
kind: [chromedriver, mapper]
head: [headful, headless]
exclude:
# Don't run headful mapper, as it takes too long.
- kind: mapper
head: headful
steps:
- name: Checkout
uses: actions/checkout@1d96c772d19495a3b5c517cd2bc0cb401ea0529f # v4.1.3
with:
submodules: true
- name: Set up Node.js
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
with:
node-version-file: '.nvmrc'
cache: npm
- uses: google/wireit@4aad131006ea85c1e42af927534ebb13426dd730 # setup-github-actions-caching/v1.0.2
- name: Install and build npm dependencies
run: npm ci
- name: Setup dirs
run: mkdir -p out
- name: Set up Python
uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d # v5.1.0
with:
python-version: '3.11'
cache: 'pip'
- name: Set up virtualenv
run: pip install virtualenv
- name: Set up hosts
run: ./wpt make-hosts-file | sudo tee -a /etc/hosts
working-directory: wpt
- name: Setup cache for browser binaries
uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2
with:
path: ~/.cache/chromium-bidi
key: ${{ runner.os }}-browsers-${{ hashFiles('.browser') }}) }}
- name: Install pinned browser
id: browser
run: node tools/install-browser.mjs --github
- name: Run WPT tests (${{matrix.kind}}, ${{matrix.head}})
timeout-minutes: 60
run: >
xvfb-run --auto-servernum
npm run wpt -- "webdriver/tests/bidi/${{ github.event.inputs.tests }}"
env:
BROWSER_BIN: ${{ steps.browser.outputs.executablePath }}
CHROMEDRIVER: ${{matrix.kind == 'chromedriver'}}
HEADLESS: ${{matrix.head=='headless'}}
UPDATE_EXPECTATIONS: true
VERBOSE: ${{ github.event.inputs.verbose }}
WPT_REPORT: out/wptreport.json
- name: Generate HTML test report
if: success() || failure()
run: >
node tools/wpt-report-builder/builder.mjs
out/wptreport.json
out/wptreport.html
out/wptreport-2023.html
- name: Upload expectations
if: success() || failure()
uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3
with:
name: ${{ matrix.kind }}-${{ matrix.head }}-wpt-metadata
path: wpt-metadata/${{ matrix.kind }}/${{ matrix.head }}
- name: Upload artifacts
if: success() || failure()
uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3
with:
name: ${{ matrix.kind }}-${{ matrix.head }}-artifacts
path: |
logs
out