Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 17 additions & 2 deletions .github/workflows/wpt-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,24 @@ jobs:
- name: Checkout
uses: actions/checkout@v7
with:
ref: ${{ github.event.pull_request.head.sha }}
fetch-depth: 0

- name: "Fetch PR changes (Internal branch: full checkout)"
if: |
github.event_name == 'pull_request_target' &&
github.event.pull_request.head.repo.full_name == github.repository
run: |
git fetch origin ${{ github.event.pull_request.head.sha }}
git checkout ${{ github.event.pull_request.head.sha }}

- name: "Fetch PR changes (Fork PR: dist/ only)"
if: |
github.event_name == 'pull_request_target' &&
github.event.pull_request.head.repo.full_name != github.repository
run: |
git fetch origin ${{ github.event.pull_request.head.sha }}
git checkout ${{ github.event.pull_request.head.sha }} -- dist/

- name: Install dependencies
run: npm install jest webpagetest

Expand All @@ -40,7 +55,7 @@ jobs:

- name: Add comment to PR
uses: mshick/add-pr-comment@v3
if: always()
if: always() && hashFiles('comment.md') != ''
with:
refresh-message-position: true
message-path: comment.md
Loading