Skip to content

Commit 202d3e0

Browse files
committed
Setup Chromatic.
1 parent 0bd142d commit 202d3e0

File tree

4 files changed

+253
-10
lines changed

4 files changed

+253
-10
lines changed

Diff for: .circleci/config.yml

+11-1
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,13 @@ jobs:
8686
yarn deploy:examples --token $NOW_API_TOKEN
8787
fi
8888
no_output_timeout: 30m
89+
chromatic:
90+
<<: *defaults
91+
steps:
92+
- checkout
93+
- attach_workspace:
94+
at: .
95+
- run: yarn test:chromatic
8996

9097
workflows:
9198
version: 2
@@ -103,4 +110,7 @@ workflows:
103110
- test
104111
- examples:
105112
requires:
106-
- build
113+
- build
114+
- chromatic:
115+
requires:
116+
- build

Diff for: .storybook/config.js

+2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
import { configure } from "@storybook/react"
22

3+
import "storybook-chromatic"
4+
35
const req = require.context("../stories", true, /\.stories\.js$/)
46
configure(() => req.keys().forEach(filename => req(filename)), module)

Diff for: package.json

+3-1
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
"test:latest": "yarn add -D -W react@latest react-dom@latest && yarn test",
2626
"test:compat": "yarn test:backwards && yarn test:forwards && yarn test:latest",
2727
"test:examples": "CI=1 lerna run --scope '*-example' test -- --passWithNoTests --watchAll=false",
28+
"test:chromatic": "chromatic test --app-code k5pzlywcw7c --build-script-name build:storybook",
2829
"ci": "yarn lint && yarn test:compat && yarn test:examples",
2930
"build:packages": "lerna run --scope 'react-async*' build",
3031
"build:examples": "lerna run --scope '*-example' build",
@@ -66,6 +67,7 @@
6667
"prop-types": "15.7.2",
6768
"react": "16.9.0",
6869
"react-async": "^8.0.0-alpha.0",
69-
"react-dom": "16.9.0"
70+
"react-dom": "16.9.0",
71+
"storybook-chromatic": "^2.2.2"
7072
}
7173
}

0 commit comments

Comments
 (0)