Enable the Github Action-based WPT upstream script

This commit is contained in:
Martin Robinson 2023-01-20 13:05:08 +01:00
parent 3831648df9
commit 772e086677
2 changed files with 34 additions and 36 deletions

View file

@ -1,34 +1,32 @@
# Disabled until the previous bot is turned off. name: WPT export
#name: WPT export on:
#on: pull_request:
# pull_request: types: ['opened', 'synchronize', 'reopened', 'edited', 'closed']
# types: ['opened', 'synchronize', 'reopened', 'edited', 'closed']
# jobs:
#jobs: upstream:
# upstream: runs-on: ubuntu-latest
# runs-on: ubuntu-latest steps:
# steps: - name: Calculate PR fetch depth
# - name: Calculate PR fetch depth run: echo "PR_FETCH_DEPTH=$(( ${{ github.event.pull_request.commits }} + 1 ))" >> "${GITHUB_ENV}"
# run: echo "PR_FETCH_DEPTH=$(( ${{ github.event.pull_request.commits }} + 1 ))" >> "${GITHUB_ENV}" - name: Check out shallow servo PR
# - name: Check out shallow servo PR run: |
# run: | mkdir servo
# mkdir servo cd servo
# cd servo git init -b main
# git init -b main git remote add origin ${{ github.event.repository.clone_url}}
# 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 pull/${{ github.event.pull_request.number}}/head:pr --depth ${{ env.PR_FETCH_DEPTH }} git checkout pr
# git checkout pr - name: Check out wpt
# - name: Check out wpt uses: actions/checkout@v3
# uses: actions/checkout@v3 with:
# with: path: wpt
# path: wpt repository: 'web-platform-tests/wpt'
# repository: 'web-platform-tests/wpt' token: ${{ secrets.GITHUB_TOKEN }}
# token: ${{ secrets.WPT_UPSTREAM_TOKEN }} - name: Install requirements
# - name: Install requirements run: pip install -r servo/etc/ci/upstream-wpt-changes/requirements.txt
# run: pip install -r servo/etc/ci/upstream-wpt-changes/requirements.txt - name: Process pull request
# - name: Process pull request run: servo/etc/ci/upstream-wpt-changes/upstream-wpt-changes.py
# run: servo/etc/ci/upstream-wpt-changes/upstream-wpt-changes.py env:
# env: GITHUB_CONTEXT: ${{ toJson(github) }}
# GITHUB_CONTEXT: ${{ toJson(github) }} WPT_SYNC_TOKEN: ${{ secrets.WPT_SYNC_TOKEN }}
# GITHUB_TOKEN: ${{ secrets.WPT_UPSTREAM_TOKEN }}
#

View file

@ -26,11 +26,11 @@ def main() -> int:
success = WPTSync( success = WPTSync(
servo_repo='servo/servo', servo_repo='servo/servo',
wpt_repo='servo/wpt', wpt_repo='web-platform-tests/wpt',
downstream_wpt_repo='servo-wpt-sync/web-platform-tests', downstream_wpt_repo='servo-wpt-sync/web-platform-tests',
servo_path='./servo', servo_path='./servo',
wpt_path='./wpt', 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_api_url='https://api.github.com/',
github_username='servo-wpt-sync', github_username='servo-wpt-sync',
github_email='josh+wptsync@joshmatthews.net', github_email='josh+wptsync@joshmatthews.net',