mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-04-29 02:32:18 +00:00
CI: Simplify update playwright expectations (maybe) (#5994)
## Summary Follow-up to https://github.com/Comfy-Org/ComfyUI_frontend/pull/5985 See if it's possible to reduce the branching, maybe add reactions and a Done comment? ## Changes - **What**: Snapshot Update Updates ┆Issue is synchronized with this [Notion page](https://www.notion.so/PR-5994-CI-Simplify-update-playwright-expectations-maybe-2876d73d365081eab031d8301c1360b7) by [Unito](https://www.unito.io)
This commit is contained in:
@@ -7,6 +7,9 @@ on:
|
|||||||
issue_comment:
|
issue_comment:
|
||||||
types: [created]
|
types: [created]
|
||||||
|
|
||||||
|
concurrency:
|
||||||
|
group: ${{ github.event.number || github.event.issue.number }}
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
test:
|
test:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
@@ -21,18 +24,36 @@ jobs:
|
|||||||
) &&
|
) &&
|
||||||
startsWith(github.event.comment.body, '/update-playwright') )
|
startsWith(github.event.comment.body, '/update-playwright') )
|
||||||
steps:
|
steps:
|
||||||
|
- name: Find Update Comment
|
||||||
|
uses: peter-evans/find-comment@b30e6a3c0ed37e7c023ccd3f1db5c6c0b0c23aad
|
||||||
|
id: "find-update-comment"
|
||||||
|
with:
|
||||||
|
issue-number: ${{ github.event.number || github.event.issue.number }}
|
||||||
|
comment-author: "github-actions[bot]"
|
||||||
|
body-includes: "Updating Playwright Expectations"
|
||||||
|
|
||||||
|
- name: Add Starting Reaction
|
||||||
|
uses: peter-evans/create-or-update-comment@e8674b075228eee787fea43ef493e45ece1004c9
|
||||||
|
with:
|
||||||
|
comment-id: ${{ steps.find-update-comment.outputs.comment-id }}
|
||||||
|
issue-number: ${{ github.event.number || github.event.issue.number }}
|
||||||
|
body: |
|
||||||
|
Updating Playwright Expectations
|
||||||
|
edit-mode: replace
|
||||||
|
reactions: eyes
|
||||||
|
|
||||||
|
- name: Get Branch SHA
|
||||||
|
id: "get-branch"
|
||||||
|
run: echo ::set-output name=branch::$(gh pr view $PR_NO --repo $REPO --json headRefName --jq '.headRefName')
|
||||||
|
env:
|
||||||
|
REPO: ${{ github.repository }}
|
||||||
|
PR_NO: ${{ github.event.number || github.event.issue.number }}
|
||||||
|
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
- name: Initial Checkout
|
- name: Initial Checkout
|
||||||
uses: actions/checkout@v5
|
uses: actions/checkout@v5
|
||||||
- name: Pull Request Checkout (from comment)
|
with:
|
||||||
run: gh pr checkout ${{ github.event.issue.number }}
|
ref: ${{ steps.get-branch.outputs.branch }}
|
||||||
if: github.event_name == 'issue_comment'
|
|
||||||
env:
|
|
||||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
- name: Pull Request Checkout (from label)
|
|
||||||
run: |
|
|
||||||
git fetch origin ${{ github.head_ref }}
|
|
||||||
git checkout ${{ github.head_ref }}
|
|
||||||
if: github.event_name == 'pull_request'
|
|
||||||
- name: Setup Frontend
|
- name: Setup Frontend
|
||||||
uses: ./.github/actions/setup-frontend
|
uses: ./.github/actions/setup-frontend
|
||||||
- name: Setup Playwright
|
- name: Setup Playwright
|
||||||
@@ -51,6 +72,7 @@ jobs:
|
|||||||
- name: Debugging info
|
- name: Debugging info
|
||||||
run: |
|
run: |
|
||||||
echo "PR: ${{ github.event.issue.number }}"
|
echo "PR: ${{ github.event.issue.number }}"
|
||||||
|
echo "Branch: ${{ steps.get-branch.outputs.branch }}"
|
||||||
git status
|
git status
|
||||||
working-directory: ComfyUI_frontend
|
working-directory: ComfyUI_frontend
|
||||||
- name: Commit updated expectations
|
- name: Commit updated expectations
|
||||||
@@ -62,16 +84,19 @@ jobs:
|
|||||||
echo "No changes to commit"
|
echo "No changes to commit"
|
||||||
else
|
else
|
||||||
git commit -m "[automated] Update test expectations"
|
git commit -m "[automated] Update test expectations"
|
||||||
if [ "${{ github.event_name }}" = "pull_request" ]; then
|
git push origin ${{ steps.get-branch.outputs.branch }}
|
||||||
git push origin HEAD:${{ github.head_ref }}
|
|
||||||
else
|
|
||||||
git push
|
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
env:
|
|
||||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
working-directory: ComfyUI_frontend
|
working-directory: ComfyUI_frontend
|
||||||
|
|
||||||
|
- name: Add Done Reaction
|
||||||
|
uses: peter-evans/create-or-update-comment@e8674b075228eee787fea43ef493e45ece1004c9
|
||||||
|
if: github.event_name == 'issue_comment'
|
||||||
|
with:
|
||||||
|
comment-id: ${{ steps.find-update-comment.outputs.comment-id }}
|
||||||
|
issue-number: ${{ github.event.number || github.event.issue.number }}
|
||||||
|
reactions: +1
|
||||||
|
reactions-edit-mode: replace
|
||||||
|
|
||||||
- name: Remove New Browser Test Expectations label
|
- name: Remove New Browser Test Expectations label
|
||||||
if: always() && github.event_name == 'pull_request'
|
if: always() && github.event_name == 'pull_request'
|
||||||
run: gh pr edit ${{ github.event.pull_request.number }} --remove-label "New Browser Test Expectations"
|
run: gh pr edit ${{ github.event.pull_request.number }} --remove-label "New Browser Test Expectations"
|
||||||
|
|||||||
Reference in New Issue
Block a user