-
Notifications
You must be signed in to change notification settings - Fork 386
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Bump actions versions Signed-off-by: Mahendra Paipuri <[email protected]>
- Loading branch information
1 parent
96f2d5a
commit a34d772
Showing
3 changed files
with
54 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
name: Update Playwright Snapshots | ||
|
||
on: | ||
issue_comment: | ||
types: [created, edited] | ||
|
||
permissions: | ||
contents: write | ||
pull-requests: write | ||
|
||
jobs: | ||
update-snapshots: | ||
if: ${{ github.event.issue.pull_request && contains(github.event.comment.body, 'update playwright snapshots') }} | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: React to the triggering comment | ||
run: | | ||
hub api repos/${{ github.repository }}/issues/comments/${{ github.event.comment.id }}/reactions --raw-field 'content=+1' | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Checkout the branch from the PR that triggered the job | ||
run: | | ||
# PR branch remote must be checked out using https URL | ||
git config --global hub.protocol https | ||
hub pr checkout ${{ github.event.issue.number }} | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Install your project | ||
run: | | ||
# Execute the required installation command | ||
- name: Update snapshots | ||
uses: jupyterlab/maintainer-tools/.github/actions/update-snapshots@v1 | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
# Test folder within your repository | ||
test_folder: playwright-tests | ||
|
||
# Optional npm scripts (the default values are displayed) | ||
# Script to start the server or 'null' if Playwright is taking care of it | ||
# If not `null`, you must provide a `server_url` to listen to. | ||
start_server_script: start | ||
# Server url to wait for before updating the snapshots | ||
# See specification for https://github.com/iFaxity/wait-on-action `resource` | ||
server_url: http-get://localhost:8888 | ||
update_script: test:update |