Auto merge of #29217 - mrobinson:upstream-wpt-changes, r=delan

Add a script to upstream WPT changes via a GitHub Action

This is a modified version of the webhook found at https://github.com/servo/upstream_wpt_webhook and deployed via SaltStack. It is updated to use modern Python and to assume that GitHub Actions will fetch the appropriate source code locally before the script is run.

---
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #29206 and #23798
- [x] There are tests for these changes
This commit is contained in:
bors-servo 2023-01-17 13:35:25 +01:00 committed by GitHub
commit a24dc77036
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
34 changed files with 4998 additions and 0 deletions

View file

@ -0,0 +1,18 @@
name: Test changes to upstream-wpt-changes
on:
pull_request:
branches: ["**"]
paths: ["etc/ci/upstream-wpt-changes/**"]
jobs:
test:
name: Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install dependencies
run: |
python3 -m pip install --upgrade -r etc/ci/upstream-wpt-changes/requirements-dev.txt
- name: Running tests
run: |
python3 etc/ci/upstream-wpt-changes/test.py

View file

@ -0,0 +1,34 @@
# Disabled until the previous bot is turned off.
#name: Upstream Web Platform Test changes
#on:
# pull_request:
# types: ['opened', 'synchronize', 'reopened', 'edited', 'closed']
#
#jobs:
# upstream:
# 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 checkout pr
# - name: Check out wpt
# uses: actions/checkout@v3
# with:
# path: wpt
# repository: 'web-platform-tests/wpt'
# token: ${{ secrets.WPT_UPSTREAM_TOKEN }}
# - name: Install requirements
# run: pip install -r servo/etc/ci/upstream-wpt-changes/requirements.txt
# - name: Process pull request
# run: servo/etc/ci/upstream-wpt-changes/upstream-wpt-changes.py
# env:
# GITHUB_CONTEXT: ${{ toJson(github) }}
# GITHUB_TOKEN: ${{ secrets.WPT_UPSTREAM_TOKEN }}
#