Skip to content

Commit

Permalink
Merge pull request #11 from jdeniau/storybook-test
Browse files Browse the repository at this point in the history
Add chromatic testing
  • Loading branch information
jdeniau authored Feb 24, 2024
2 parents 98bedb2 + d875819 commit 1ef7f6c
Show file tree
Hide file tree
Showing 4 changed files with 47 additions and 2 deletions.
23 changes: 23 additions & 0 deletions .github/workflows/chromatic.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: 'Chromatic'

on: push

jobs:
chromatic:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Enable corepack
run: corepack enable

- name: Install dependencies
run: yarn install --immutable

- name: Publish to Chromatic
uses: chromaui/action@latest
with:
projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }}
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -100,4 +100,4 @@ out/
!.yarn/plugins
!.yarn/releases
!.yarn/sdks
!.yarn/versions
!.yarn/versions
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@
"lint:types": "tsc --noEmit",
"test": "vitest",
"storybook": "storybook dev -p 6006",
"build-storybook": "storybook build"
"build-storybook": "storybook build",
"chromatic": "npx chromatic"
},
"keywords": [],
"author": {
Expand Down Expand Up @@ -55,6 +56,7 @@
"@types/react-dom": "^18.2.19",
"@typescript-eslint/eslint-plugin": "^7.0.2",
"@typescript-eslint/parser": "^7.0.2",
"chromatic": "^11.0.0",
"electron": "28.2.3",
"electron-devtools-installer": "^3.2.0",
"eslint": "^8.56.0",
Expand Down
20 changes: 20 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -6353,6 +6353,25 @@ __metadata:
languageName: node
linkType: hard

"chromatic@npm:^11.0.0":
version: 11.0.0
resolution: "chromatic@npm:11.0.0"
peerDependencies:
"@chromatic-com/cypress": ^0.5.2 || ^1.0.0
"@chromatic-com/playwright": ^0.5.2 || ^1.0.0
peerDependenciesMeta:
"@chromatic-com/cypress":
optional: true
"@chromatic-com/playwright":
optional: true
bin:
chroma: dist/bin.js
chromatic: dist/bin.js
chromatic-cli: dist/bin.js
checksum: 10c0/edd92b3fb370c8d358cd587392686e83af34aec0e5d6592bfc637d6b6c1f670f3910ff572182192dcf1adf8e34384f785597dcdcb89196482f0c6fa55547d1bf
languageName: node
linkType: hard

"chrome-trace-event@npm:^1.0.3":
version: 1.0.3
resolution: "chrome-trace-event@npm:1.0.3"
Expand Down Expand Up @@ -14191,6 +14210,7 @@ __metadata:
"@typescript-eslint/eslint-plugin": "npm:^7.0.2"
"@typescript-eslint/parser": "npm:^7.0.2"
antd: "npm:^5.14.1"
chromatic: "npm:^11.0.0"
electron: "npm:28.2.3"
electron-devtools-installer: "npm:^3.2.0"
electron-squirrel-startup: "npm:^1.0.0"
Expand Down

0 comments on commit 1ef7f6c

Please sign in to comment.