mirror of
https://github.com/servo/servo.git
synced 2025-08-02 20:20:14 +01:00
Enable the Github Action-based WPT upstream script
This commit is contained in:
parent
3831648df9
commit
772e086677
2 changed files with 34 additions and 36 deletions
66
.github/workflows/upstream-wpt-changes.yml
vendored
66
.github/workflows/upstream-wpt-changes.yml
vendored
|
@ -1,34 +1,32 @@
|
|||
# Disabled until the previous bot is turned off.
|
||||
#name: WPT export
|
||||
#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 }}
|
||||
#
|
||||
name: WPT export
|
||||
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.GITHUB_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) }}
|
||||
WPT_SYNC_TOKEN: ${{ secrets.WPT_SYNC_TOKEN }}
|
||||
|
|
|
@ -26,11 +26,11 @@ def main() -> int:
|
|||
|
||||
success = WPTSync(
|
||||
servo_repo='servo/servo',
|
||||
wpt_repo='servo/wpt',
|
||||
wpt_repo='web-platform-tests/wpt',
|
||||
downstream_wpt_repo='servo-wpt-sync/web-platform-tests',
|
||||
servo_path='./servo',
|
||||
wpt_path='./wpt',
|
||||
github_api_token=os.environ['WPT_SYNC_GITHUB_TOKEN'],
|
||||
github_api_token=os.environ['WPT_SYNC_TOKEN'],
|
||||
github_api_url='https://api.github.com/',
|
||||
github_username='servo-wpt-sync',
|
||||
github_email='josh+wptsync@joshmatthews.net',
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue