feat(print): throw unsupported operation when content area is empty #2666
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This workflow will check out wpt and run the WebDriver BiDi tests against our | |
# implementation. | |
name: WPT | |
env: | |
DEBUG: 'bidi:server:info,bidi:mapper:debug:*' | |
FORCE_COLOR: 3 | |
PIP_DISABLE_PIP_VERSION_CHECK: 1 | |
on: | |
merge_group: | |
pull_request: | |
push: | |
branches: 'main' | |
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@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2 | |
with: | |
name: chromedriver-headless-artifacts | |
- name: Prepare Pages | |
run: | | |
mkdir -p out/site | |
cp out/wptreport.html out/site/index.html | |
- name: Setup Pages | |
uses: actions/configure-pages@f156874f8191504dae5b037505266ed5dda6c382 # v3.0.6 | |
- name: Upload Pages artifact | |
uses: actions/upload-pages-artifact@66b63f4a7de003f4f00cc8e9af4b83b8f2abdb96 # v1.0.9 | |
with: | |
path: out/site | |
- name: Deploy to GitHub Pages | |
id: deployment | |
uses: actions/deploy-pages@ee48c7b82e077d7b8ef30b50a719e6a792a50c9a # v2.0.2 | |
wpt-auto-commit: | |
name: WPT auto-commit expectations | |
needs: wpt | |
if: ${{ always() && github.event.inputs.auto-commit == 'true' }} | |
runs-on: ubuntu-latest | |
# Give GITHUB_TOKEN write permission to commit and push. | |
# Needed by stefanzweifel/git-auto-commit-action@v4. | |
permissions: | |
contents: write | |
steps: | |
- name: Checkout | |
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 | |
- uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2 | |
with: | |
name: chromedriver-headless-wpt-metadata | |
- uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2 | |
with: | |
name: mapper-headless-wpt-metadata | |
- uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2 | |
with: | |
name: mapper-headful-wpt-metadata | |
- name: Auto-commit WPT expectations | |
if: (success() || failure()) && github.event.inputs.auto-commit == 'true' | |
uses: stefanzweifel/git-auto-commit-action@v4 | |
with: | |
commit_message: Update WPT expectations | |
commit_options: -n --signoff | |
file_pattern: 'wpt-metadata/**/*.ini' | |
wpt: | |
name: ${{ matrix.kind }}-${{ matrix.head }} | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- kind: mapper | |
head: headful | |
- kind: mapper | |
head: headless | |
- kind: chromedriver | |
head: headless | |
steps: | |
- name: Checkout | |
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 | |
with: | |
submodules: true | |
- name: Set up Node.js | |
uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3.6.0 | |
with: | |
node-version: 16 | |
cache: npm | |
- uses: google/wireit@f3a3c79c553122e2fe5829eeac7d815326502903 # setup-github-actions-caching/v1 | |
- name: Install and build npm dependencies | |
run: npm ci | |
- name: Setup dirs | |
run: mkdir -p out | |
- name: Set up Python | |
uses: actions/setup-python@bd6b4b6205c4dbad673328db7b31b7fab9e241c0 # v4.6.1 | |
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@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3.3.1 | |
with: | |
path: ~/.cache/chromium-bidi | |
key: ${{ runner.os }}-browsers-${{ hashFiles('.browser') }}) }} | |
- name: Install pinned browser | |
id: browser | |
run: node install-browser.mjs | |
- name: Run WPT tests (mapper, headful) | |
if: matrix.head == 'headful' && matrix.kind == 'mapper' | |
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 }} | |
HEADLESS: false | |
UPDATE_EXPECTATIONS: true | |
VERBOSE: ${{ github.event.inputs.verbose }} | |
WPT_REPORT: out/wptreport.json | |
- name: Run WPT tests (mapper, headless) | |
if: matrix.head == 'headless' && matrix.kind == 'mapper' | |
timeout-minutes: 60 | |
run: npm run wpt -- "webdriver/tests/bidi/${{ github.event.inputs.tests }}" | |
env: | |
BROWSER_BIN: ${{ steps.browser.outputs.executablePath }} | |
HEADLESS: true | |
UPDATE_EXPECTATIONS: true | |
VERBOSE: ${{ github.event.inputs.verbose }} | |
WPT_REPORT: out/wptreport.json | |
- name: Run WPT tests (chromedriver, new headless) | |
if: matrix.head == 'headless' && matrix.kind == 'chromedriver' | |
timeout-minutes: 60 | |
run: npm run wpt -- "webdriver/tests/bidi/${{ github.event.inputs.tests }}" | |
env: | |
BROWSER_BIN: ${{ steps.browser.outputs.executablePath }} | |
CHROMEDRIVER: true | |
UPDATE_EXPECTATIONS: true | |
VERBOSE: ${{ github.event.inputs.verbose }} | |
WPT_REPORT: out/wptreport.json | |
- name: Generate HTML test report | |
if: success() || failure() | |
run: > | |
node test-report/htmlWptReport.mjs | |
out/wptreport.json | |
out/wptreport.html | |
- name: Upload expectations | |
if: success() || failure() | |
uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2 | |
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@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2 | |
with: | |
name: ${{ matrix.kind }}-${{ matrix.head }}-artifacts | |
path: | | |
logs | |
out |