Skip to content

Commit

Permalink
tools: add WPT updater
Browse files Browse the repository at this point in the history
  • Loading branch information
Mert Can Altin committed Aug 20, 2024
1 parent ef4bdbf commit 9b1cda3
Showing 1 changed file with 52 additions and 0 deletions.
52 changes: 52 additions & 0 deletions .github/workflows/update-wpt.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: Update WPT

on:
workflow_dispatch:
schedule:
# Run once a week at 12:00 AM UTC on Sunday.
- cron: 0 0 * * *

jobs:
update-wpt:
name: Update WPT
permissions:
contents: write
pull-requests: write
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
with:
persist-credentials: false
- name: Update WPT
run: |
rm -rf test/fixtures/wpt && mkdir test/fixtures/wpt &&
- name: Clone WPT Repository
uses: actions/checkout@v2
with:
repository: web-platform-tests/wpt

Check failure on line 27 in .github/workflows/update-wpt.yml

View workflow job for this annotation

GitHub Actions / lint-yaml

27:13 [indentation] wrong indentation: expected 10 but found 12
ref: ${{ github.sha }}
path: test/fixtures/tmp-wpt
sparse_checkout: common/ eventsource/ fetch/ interfaces/ mimesniff/ resources/ service-workers/ storage/ websockets/ xhr/
- name: Move WPT Files
run: |
mv test/fixtures/tmp-wpt/LICENSE.md test/fixtures/wpt/LICENSE.md &&
mv test/fixtures/tmp-wpt/common test/fixtures/wpt/common &&
mv test/fixtures/tmp-wpt/eventsource test/fixtures/wpt/eventsource &&
mv test/fixtures/tmp-wpt/fetch test/fixtures/wpt/fetch &&
mv test/fixtures/tmp-wpt/interfaces test/fixtures/wpt/interfaces &&
mv test/fixtures/tmp-wpt/mimesniff test/fixtures/wpt/mimesniff &&
mv test/fixtures/tmp-wpt/resources test/fixtures/wpt/resources &&
mv test/fixtures/tmp-wpt/service-workers test/fixtures/wpt/service-workers &&
mv test/fixtures/tmp-wpt/storage test/fixtures/wpt/storage &&
mv test/fixtures/tmp-wpt/websockets test/fixtures/wpt/websockets &&
mv test/fixtures/tmp-wpt/xhr test/fixtures/wpt/xhr &&
rm -rf test/fixtures/tmp-wpt/.git
- name: Create Pull Request
uses: peter-evans/create-pull-request@c5a7806660adbe173f04e3e038b0ccdcd758773c # v6.1.0
with:
token: ${{ secrets.GITHUB_TOKEN }}
branch: actions/wpt-update
title: Update WPT
body: Automated update of the WPT
commit-message: 'test: update wpt test'

0 comments on commit 9b1cda3

Please sign in to comment.