servo/.github/workflows/pull-request-wpt-export.yml
Martin Robinson ae9a9e1d17
Combine all script tests into test-scripts
Remove:
    - tidy self test support from `./mach test`
    - `./mach test-idl`

Adds a `./mach test-scripts` command that is responsible for running all
Python script tests. Run this during the CI to catch regressions in
changes to scripts. The WebIDL tests are still *very* slow and there are
from Gecko, so only run them when "-a" is passed meaning all tests.
2023-06-29 19:09:33 +02:00

40 lines
1.6 KiB
YAML

name: Pull request (WPT export)
on:
pull_request_target:
types: ['opened', 'synchronize', 'reopened', 'edited', 'closed']
jobs:
upstream:
# Run job only on servo/servo
if: github.repository == 'servo/servo'
runs-on: ubuntu-latest
steps:
- name: Calculate PR fetch depth
run: echo "PR_FETCH_DEPTH=$(( ${{ github.event.pull_request.commits }} + 1 ))" >> "${GITHUB_ENV}"
- name: Check out shallow servo PR
run: |
mkdir servo
cd servo
git init -b main
git remote add origin ${{ github.event.repository.clone_url}}
git fetch origin pull/${{ github.event.pull_request.number}}/head:pr --depth ${{ env.PR_FETCH_DEPTH }}
git fetch origin master:master --depth 1
git checkout master
- name: Check out wpt
uses: actions/checkout@v3
with:
path: wpt
repository: 'web-platform-tests/wpt'
# The token here must be the token that we will use to push to the
# WPT repository and not the token used for GitHub actions, because
# the checkout action sets up an `extraheader` authorization override
# using the token specified here.
# See https://github.com/actions/checkout/issues/162.
token: ${{ secrets.WPT_SYNC_TOKEN }}
- name: Install requirements
run: pip install -r servo/python/requirements.txt
- name: Process pull request
run: servo/python/wpt/export.py
env:
GITHUB_CONTEXT: ${{ toJson(github) }}
WPT_SYNC_TOKEN: ${{ secrets.WPT_SYNC_TOKEN }}