Skip to content

Conversation

@alexandrudanpop
Copy link
Contributor

@alexandrudanpop alexandrudanpop commented Jan 15, 2026

Fixes OPS-3420

@linear
Copy link

linear bot commented Jan 15, 2026

@alexandrudanpop alexandrudanpop changed the title Chore/chromatic Run chromatic only when ui-components change Jan 15, 2026
@alexandrudanpop alexandrudanpop marked this pull request as ready for review January 15, 2026 12:59
Copilot AI review requested due to automatic review settings January 15, 2026 12:59
Copy link
Contributor

Copilot AI left a 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-components or package-lock.json
  • Configured Chromatic to use the ui-components package 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.

@alexandrudanpop
Copy link
Contributor Author

alexandrudanpop commented Jan 15, 2026

@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
Copy link
Contributor

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.

Copy link
Contributor Author

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

@cezudas
Copy link
Contributor

cezudas commented Jan 15, 2026

@cezudas need to try it out, from my research this should be ok even with turbosnap

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:

  • onlyChanged: true is set
  • fetch-depth: 0 is set
    Path filtering should not affect TurboSnap, relying just on git history.

@maor-rozenfeld
Copy link
Contributor

What about dependencies? like the shared/common/openops packages

@alexandrudanpop
Copy link
Contributor Author

What about dependencies? like the shared/common/openops packages

added

@sonarqubecloud
Copy link

@alexandrudanpop alexandrudanpop changed the title Run chromatic only when ui-components change Run chromatic only when ui-components or it's dependencies change Jan 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants