Skip to content

Commit

Permalink
ci: Force update snapshots workflow
Browse files Browse the repository at this point in the history
Signed-off-by: Mahendra Paipuri <[email protected]>
  • Loading branch information
mahendrapaipuri committed Dec 15, 2024
1 parent f25cdd9 commit 0e57745
Showing 1 changed file with 17 additions and 26 deletions.
43 changes: 17 additions & 26 deletions .github/workflows/update-playwright-snapshots.yml
Original file line number Diff line number Diff line change
@@ -1,33 +1,36 @@
name: Update Playwright Snapshots

# on:
# issue_comment:
# types: [created, edited]

on:
issue_comment:
types: [created, edited]
pull_request_target:

permissions:
contents: write
pull-requests: write

jobs:
update-snapshots:
if: ${{ github.event.issue.pull_request && contains(github.event.comment.body, 'update playwright 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: |
gh api repos/${{ github.repository }}/issues/comments/${{ github.event.comment.id }}/reactions --raw-field 'content=+1'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# - name: React to the triggering comment
# run: |
# gh 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: |
gh pr checkout ${{ github.event.issue.number }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# - name: Checkout the branch from the PR that triggered the job
# run: |
# gh pr checkout ${{ github.event.issue.number }}
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Install from source
run: HATCH_BUILD_HOOKS_ENABLE=true python -m pip install -e '.[test-ui]'
Expand All @@ -38,24 +41,12 @@ jobs:
# check its own functionality (https://github.com/jpmorganchase/jupyter-fs/blob/main/jupyterfs/browser-test.js)
pip uninstall jupyter-fs -y
- name: Install galata
working-directory: jupyterlab/packages/jupyterlab-jupytext-extension/ui-tests
env:
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 1
run: |
pip install jupyterlab
jlpm install
- name: Install browser
working-directory: jupyterlab/packages/jupyterlab-jupytext-extension/ui-tests
run: jlpm playwright install chromium

- 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: ./jupyterlab/packages/jupyterlab-jupytext-extension/ui-tests/tests
test_folder: jupyterlab/packages/jupyterlab-jupytext-extension/ui-tests/tests

# Optional npm scripts (the default values are displayed)
# Script to start the server or 'null' if Playwright is taking care of it
Expand Down

0 comments on commit 0e57745

Please sign in to comment.