-
Notifications
You must be signed in to change notification settings - Fork 5
92 lines (70 loc) · 2.05 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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
name: Pull Request
on: pull_request
jobs:
install:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: Workday/canvas-kit-actions/install@v1
with:
node_version: 18.x
build:
runs-on: ubuntu-latest
needs: 'install'
steps:
- uses: actions/checkout@v4
- uses: Workday/canvas-kit-actions/install@v1
with:
node_version: 18.x
- name: Build Tokens
run: yarn build:tokens
- name: Build Storybook
run: yarn build-storybook
- name: Cache Build
id: build-cache
uses: actions/cache@v3
with:
path: docs
key: ${{ runner.os }}-build-${{ github.sha }}
check:
runs-on: ubuntu-latest
needs: ['install', 'build']
steps:
- uses: actions/checkout@v4
- uses: Workday/canvas-kit-actions/install@v1
with:
node_version: 18.x
# Keep steps separate for Github Actions annotation matching: https://github.com/actions/setup-node/blob/83c9f7a7df54d6b57455f7c57ac414f2ae5fb8de/src/setup-node.ts#L26-L33
- name: Lint
shell: bash
run: yarn lint
- name: Build Tokens
run: yarn build:tokens
- name: Type Check
shell: bash
run: yarn typecheck
- name: Run Unit Tests
shell: bash
run: yarn test
visual-test:
runs-on: ubuntu-latest
needs: 'build'
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # Required to retrieve git history
- uses: Workday/canvas-kit-actions/install@v1
with:
node_version: 18.x
- name: Restore Build
uses: actions/cache@v3
with:
path: docs
key: ${{ runner.os }}-build-${{ github.sha }}
- uses: chromaui/action@main
with:
token: ${{ secrets.GITHUB_TOKEN }}
projectToken: chpt_a9e354687a28e6e
storybookBuildDir: docs/storybook/@workday/canvas-tokens-docs/
exitOnceUploaded: false
exitZeroOnChanges: true