forked from Shopify/polaris
-
Notifications
You must be signed in to change notification settings - Fork 1
62 lines (54 loc) · 1.58 KB
/
ci.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
name: CI
on: push
jobs:
test:
name: 'Test'
runs-on: ubuntu-latest
strategy:
matrix:
node-version: ['16.9.1']
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
cache: yarn
- run: yarn --frozen-lockfile
- run: yarn run type-check && yarn run build
- run: yarn run lint
- run: yarn run test
accessibility_test:
name: 'Accessibility test'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
cache: yarn
- run: yarn --frozen-lockfile
- run: yarn run storybook:build --quiet
- run: node ./scripts/accessibility-check.js
env:
STORYBOOK_DISABLE_DOCS: 1
visual_regression_test:
name: 'Visual regression test'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0 # Chromatic git history to track changes
- uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
cache: yarn
- run: yarn --frozen-lockfile
- run: yarn storybook:build --quiet
- uses: chromaui/action@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }}
storybookBuildDir: 'build-internal/storybook/static'
autoAcceptChanges: 'main'
exitZeroOnChanges: true
exitOnceUploaded: true