-
-
Notifications
You must be signed in to change notification settings - Fork 22
55 lines (39 loc) · 1.25 KB
/
pr-checker.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
name: Pr Checker
on: [pull_request]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version-file: '.nvmrc'
- run: yarn install --frozen-lockfile
- run: yarn add @percy/cli -D
- run: yarn build
env:
NOTION_API_KEY: ${{secrets.NOTION_API_KEY}}
DATABASE_ID: ${{secrets.DATABASE_ID}}
visual-testing:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version-file: '.nvmrc'
- run: yarn install --frozen-lockfile
- run: yarn add @percy/cli -D
- run: mkdir -p theme-dist/light && mkdir -p theme-dist/dark
- run: yarn build:light --base light
env:
NOTION_API_KEY: ${{secrets.NOTION_API_KEY}}
DATABASE_ID: ${{secrets.DATABASE_ID}}
- run: cp -R dist/* theme-dist/light
- run: yarn build:dark --base dark
env:
NOTION_API_KEY: ${{secrets.NOTION_API_KEY}}
DATABASE_ID: ${{secrets.DATABASE_ID}}
- run: cp -R dist/* theme-dist/dark
- run: npx percy snapshot theme-dist/
env:
PERCY_TOKEN: ${{secrets.PERCY_TOKEN}}