Skip to content

Commit 79808d3

Browse files
authored
Merge pull request #5 from kenshoo/chromatic-integration
attempt naive chromatic integration
2 parents 3d8dbb2 + 6d6a847 commit 79808d3

File tree

2 files changed

+15
-2
lines changed

2 files changed

+15
-2
lines changed

.travis.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,17 @@
11
language: node_js
22
node_js:
33
- "12"
4+
cache: yarn
5+
6+
script:
7+
- export BRANCH=$(if [ "$TRAVIS_PULL_REQUEST" == "false" ]; then echo $TRAVIS_BRANCH; else echo $TRAVIS_PULL_REQUEST_BRANCH; fi)
8+
- yarn build
9+
- cd ./packages/docs
10+
- yarn install
11+
- if [ "$BRANCH" == "master" ];
12+
then
13+
yarn chromatic --auto-accept-changes;
14+
elif [[ $TRAVIS_EVENT_TYPE != 'pull_request' || $TRAVIS_PULL_REQUEST_SLUG != $TRAVIS_REPO_SLUG ]];
15+
then
16+
yarn chromatic;
17+
fi

packages/docs/package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,7 @@
1717
"dependencies": {},
1818
"scripts": {
1919
"storybook": "start-storybook -p 6006",
20-
"build-storybook": "build-storybook",
21-
"chromatic:rebase": "chromatic --auto-accept-changes",
20+
"build-storybook": "build-storybook --quiet",
2221
"chromatic": "chromatic --exit-zero-on-changes"
2322
}
2423
}

0 commit comments

Comments
 (0)