generated from storybookjs/addon-kit
-
Notifications
You must be signed in to change notification settings - Fork 1
65 lines (59 loc) · 1.74 KB
/
pull-request.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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
name: pull-request
on:
pull_request:
types: [opened, synchronize]
branches-ignore:
- 'changeset-release/*'
- 'vis-bot/update-snapshot/*'
jobs:
verify:
strategy:
matrix:
os:
- ubuntu-latest
- windows-latest
node-version:
- 18
- 20
- 22
runs-on: ${{ matrix.os }}
env:
PLAYWRIGHT_PATH: "~/.cache/ms-playwright"
steps:
- name: Get AppData Directory
if: matrix.os == 'windows-latest'
run: echo ("PLAYWRIGHT_PATH=" + $env:LOCALAPPDATA + "\ms-playwright") >> $env:GITHUB_ENV
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v3
- name: Setup Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: pnpm
- name: Cache Playwright Browsers
uses: actions/cache@v4
id: cache-playwright
with:
path: ${{ env.PLAYWRIGHT_PATH }}
key: ${{ runner.os }}-playwright-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-playwright-
- name: Install playwright browsers
run: pnpx playwright install --with-deps chromium firefox
if: steps.cache-playwright.outputs.cache-hit != 'true'
- name: Install Dependencies
run: pnpm install
- name: Verify
uses: nick-fields/retry@v3
with:
timeout_minutes: 10
max_attempts: 3
command: pnpm verify:ci
- name: Archive snapshots
if: failure()
uses: actions/upload-artifact@v4
with:
name: snapshots
path: |
'**/__vis__/__diffs__'
'**/__vis__/__results__'