Skip to content

Commit 532d3cb

Browse files
authored
Merge pull request #1159 from gathercontent/feature/add-chromatic
add chromatic
2 parents d79c724 + 326391f commit 532d3cb

File tree

3 files changed

+55
-1
lines changed

3 files changed

+55
-1
lines changed

.github/workflows/chromatic.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: 'Chromatic Publish'
2+
3+
on: push
4+
5+
jobs:
6+
build:
7+
runs-on: ubuntu-latest
8+
9+
strategy:
10+
matrix:
11+
node-version: [16.x]
12+
13+
steps:
14+
- name: Checking out project
15+
uses: actions/checkout@v2
16+
with:
17+
fetch-depth: 0 # 👈 Required to retrieve git history
18+
- name: Use Node.js ${{ matrix.node-version }}
19+
uses: actions/setup-node@v1
20+
with:
21+
node-version: ${{ matrix.node-version }}
22+
- name: install
23+
run: npm install --ignore-scripts
24+
- name: 'Build chromatic'
25+
run: npm run chromatic

package-lock.json

Lines changed: 26 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,9 @@
5858
"lint": "eslint -c .eslintrc.json 'lib/**/*.js' 'tests/**/*.js' --fix",
5959
"prepare": "npm run build",
6060
"storybook": "start-storybook -p 6006 -c .storybook",
61-
"test": "jest --notify"
61+
"build-storybook": "build-storybook",
62+
"test": "jest --notify",
63+
"chromatic": "chromatic --project-token=1f9e13b797f2 --auto-accept-changes"
6264
},
6365
"husky": {
6466
"hooks": {
@@ -139,6 +141,7 @@
139141
"babel-loader": "^8.2.2",
140142
"babel-plugin-inline-react-svg": "^0.2.0",
141143
"babel-plugin-module-resolver": "^3.2.0",
144+
"chromatic": "^6.11.4",
142145
"copyfiles": "^1.2.0",
143146
"css-loader": "^4.3.0",
144147
"cssnano": "^5.0.11",

0 commit comments

Comments
 (0)