-
Notifications
You must be signed in to change notification settings - Fork 166
Run chromatic only when ui-components or it's dependencies change #1842
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR optimizes the Chromatic workflow to run only when UI components change, reducing unnecessary CI runs and resource usage.
Changes:
- Modified Chromatic workflow trigger to run only on changes to
packages/ui-componentsorpackage-lock.json - Configured Chromatic to use the
ui-componentspackage as the Storybook base directory - Increased Node.js memory allocation for the Chromatic job
Reviewed changes
Copilot reviewed 2 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| .github/workflows/chromatic.yml | Added path filtering to trigger workflow only on UI component changes and increased Node memory limit |
| chromatic.config.json | Set Storybook base directory to the ui-components package |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
@cezudas need to try it out, from my research this should be ok even with turbosnap |
| runs-on: ubuntu-latest | ||
| env: | ||
| CHROMATIC_PROJECT_TOKEN: ${{ secrets.CHROMATIC_PROJECT_TOKEN }} | ||
| NODE_OPTIONS: --max-old-space-size=4096 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suppose this is to avoid an OOM issue unrelated to this ticket.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yep, I had it in the other repo
I believe it should work according to the Chromatic documentation: https://www.chromatic.com/docs/github-actions/#recommended-configuration-for-build-events and https://www.chromatic.com/docs/turbosnap/. TurboSnap should still work and snapshot baselines should remain valid:
|
|
What about dependencies? like the shared/common/openops packages |
added |
|



Fixes OPS-3420