Skip to content

Commit 3114a60

Browse files
ci: optimize chromatic (#8776)
* Update ci.yaml Modified the Chromatic job configuration to reduce snapshot usage and only run Chromatic on necessary UI changes. Signed-off-by: BrunoQuaresma <bruno_nonato_quaresma@hotmail.com> * fix fmt --------- Signed-off-by: BrunoQuaresma <bruno_nonato_quaresma@hotmail.com> Co-authored-by: Reuben Ellis <ethriel3695@gmail.com>
1 parent c236a29 commit 3114a60

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

.github/workflows/ci.yaml

+12
Original file line numberDiff line numberDiff line change
@@ -575,10 +575,17 @@ jobs:
575575
with:
576576
buildScriptName: "storybook:build"
577577
exitOnceUploaded: true
578+
# This will prevent CI from failing when Chromatic detects visual changes
579+
exitZeroOnChanges: true
578580
# Chromatic states its fine to make this token public. See:
579581
# https://www.chromatic.com/docs/github-actions#forked-repositories
580582
projectToken: 695c25b6cb65
581583
workingDir: "./site"
584+
# Prevent excessive build runs on minor version changes
585+
skip: "@(renovate/**|dependabot/**)"
586+
# Run TurboSnap to trace file dependencies to related stories
587+
# and tell chromatic to only take snapshots of relevent stories
588+
onlyChanged: true
582589

583590
# This is a separate step for mainline only that auto accepts and changes
584591
# instead of holding CI up. Since we squash/merge, this is defensive to
@@ -594,9 +601,14 @@ jobs:
594601
STORYBOOK: true
595602
with:
596603
autoAcceptChanges: true
604+
# This will prevent CI from failing when Chromatic detects visual changes
605+
exitZeroOnChanges: true
597606
buildScriptName: "storybook:build"
598607
projectToken: 695c25b6cb65
599608
workingDir: "./site"
609+
# Run TurboSnap to trace file dependencies to related stories
610+
# and tell chromatic to only take snapshots of relevent stories
611+
onlyChanged: true
600612

601613
offlinedocs:
602614
name: offlinedocs

0 commit comments

Comments
 (0)