-
Notifications
You must be signed in to change notification settings - Fork 4
47 lines (36 loc) · 1.16 KB
/
update-snapshots.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
name: Update snapshots
on:
issue_comment:
types: [created]
jobs:
update-snapshots:
if: ${{ github.event.issue.pull_request && github.event.comment.body == '/update-snapshots' }}
runs-on: ubuntu-latest
steps:
- uses: xt0rted/pull-request-comment-branch@v2
id: comment-branch
- uses: actions/checkout@v4
if: success()
with:
ref: ${{ steps.comment-branch.outputs.head_ref }}
- name: Setup node@lts
uses: actions/setup-node@v4
with:
node-version: lts/*
- name: Installation
run: npm ci
- name: Install Playwright
run: npx playwright install --with-deps
- name: Waiting for 200 from the Vercel Preview
uses: patrickedqvist/[email protected]
id: waitFor200
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: Run e2e test
if: success()
run: npm run test:e2e -- --update-snapshots
env:
PLAYWRIGHT_TEST_BASE_URL: ${{ steps.waitFor200.outputs.url }}
- uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: '[CI] Update snapshots'