Files
servo/.github/workflows/scheduled-wpt-import.yml
Euclid Ye c242860f0e ci: Upgrade soon deprecated GitHub Actions (#43173)
I got so many warnings about [Node 20
EOL](https://github.blog/changelog/2025-09-19-deprecation-of-node-20-on-github-actions-runners/)
in the [try](https://github.com/servo/servo/actions/runs/22945103342):

> The following actions are running on Node.js 20 and may not work as
expected...

We avoid touching those actions forked from web-platform-tests.

Testing: If this can merge, it is successful.

---------

Signed-off-by: Euclid Ye <yezhizhenjiakang@gmail.com>
2026-03-11 11:02:42 +00:00

78 lines
2.5 KiB
YAML

name: WPT Import
on:
schedule:
# Run this job every Sunday at 00:00.
- cron: "0 0 * * 0"
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
linux:
# This job is only useful when run on upstream servo.
if: github.repository == 'servo/servo' || github.event_name == 'workflow_dispatch'
name: Linux
uses: ./.github/workflows/linux.yml
with:
wpt-sync-from-upstream: true
wpt: true
unit-tests: false
sync:
# This job is only useful when run on upstream servo.
if: github.repository == 'servo/servo' || github.event_name == 'workflow_dispatch'
name: Synchronize WPT Nightly
runs-on: ubuntu-22.04
needs:
- "linux"
steps:
- name: Checkout code
uses: actions/checkout@v5
- uses: actions/download-artifact@v8
with:
name: wpt-full-logs-linux
- name: Setup Python
uses: ./.github/actions/setup-python
- name: Change Mirror Priorities
uses: ./.github/actions/apt-mirrors
- name: Prep environment
run: |
sudo apt update
./mach bootstrap --yes --skip-lints --skip-nextest
- name: Add upstream remote
run: |
git config --local user.email "ghbot+wpt-sync@servo.org"
git config --local user.name "WPT Sync Bot"
git remote add upstream https://github.com/servo/servo.git
git fetch --unshallow upstream
- name: Fetch upstream changes before syncing
run: |
./mach update-wpt --sync --patch
- name: Amend commit with test results
run: |
export CURRENT_DATE=$(date +"%d-%m-%Y")
echo $CURRENT_DATE
echo "CURRENT_DATE=$CURRENT_DATE" >> $GITHUB_ENV
./mach update-wpt linux/raw/*.log
git add tests/wpt/meta
uv lock
git commit -a --amend -s --no-edit
- name: Push changes
uses: ad-m/github-push-action@master
with:
branch: wpt_update_${{ env.CURRENT_DATE }}
- name: Open PR
env:
GH_TOKEN: ${{ secrets.WPT_SYNC_TOKEN }}
UPDATE_BRANCH: wpt_update_${{ env.CURRENT_DATE }}
run: |
BODY=$(cat <<EOF
Automated downstream sync of changes from upstream as of ${{ env.CURRENT_DATE }}
[no-wpt-sync]
EOF
)
gh pr create \
--title "Sync WPT with upstream (${{ env.CURRENT_DATE }})" \
--body "$BODY" --head ${{ env.UPDATE_BRANCH }}