chore(chromatic): do not run on changesets branch#7432
chore(chromatic): do not run on changesets branch#7432louis-bompart wants to merge 4 commits intomainfrom
Conversation
|
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
There was a problem hiding this comment.
Pull request overview
This PR aims to prevent Chromatic visual tests from running on Changesets release PR branches, since they can trigger unnecessary rebuilds.
Changes:
- Added a branch check to skip the Chromatic run step when the PR head branch is
changeset-release/main.
| if: contains(needs.affected.outputs.projects, '@coveo/atomic') && github.event_name == 'pull_request' && !contains(github.event.pull_request.labels.*.name, 'chromatic') && github.head_ref != 'changeset-release/main' | ||
| - run: pnpm exec turbo chromatic --filter=@coveo/atomic -- --skip | ||
| working-directory: packages/atomic | ||
| if: steps.chromatic-run.outcome == 'skipped' |
There was a problem hiding this comment.
This new condition only skips the chromatic-run step, but the fallback turbo chromatic -- --skip step will still run when chromatic-run is skipped (including on changeset-release/main). Since the chromatic turbo task depends on build:storybook (see packages/atomic/turbo.json), changeset-release PRs will still trigger the Storybook rebuild you’re trying to avoid. Consider also excluding the changeset-release branch from the --skip step (and/or gating the expensive setup/build steps), and using a broader match like startsWith(..., 'changeset-release/') instead of an exact branch name if you want to cover all changeset-release branches.
| if: contains(needs.affected.outputs.projects, '@coveo/atomic') && github.event_name == 'pull_request' && !contains(github.event.pull_request.labels.*.name, 'chromatic') && github.head_ref != 'changeset-release/main' | |
| - run: pnpm exec turbo chromatic --filter=@coveo/atomic -- --skip | |
| working-directory: packages/atomic | |
| if: steps.chromatic-run.outcome == 'skipped' | |
| if: contains(needs.affected.outputs.projects, '@coveo/atomic') && github.event_name == 'pull_request' && !contains(github.event.pull_request.labels.*.name, 'chromatic') && !startsWith(github.head_ref, 'changeset-release/') | |
| - run: pnpm exec turbo chromatic --filter=@coveo/atomic -- --skip | |
| working-directory: packages/atomic | |
| if: steps.chromatic-run.outcome == 'skipped' && (github.event_name != 'pull_request' || !startsWith(github.head_ref, 'changeset-release/')) |
@coveo/atomic
@coveo/atomic-hosted-page
@coveo/atomic-legacy
@coveo/atomic-react
@coveo/auth
@coveo/bueno
@coveo/create-atomic
@coveo/create-atomic-component
@coveo/create-atomic-component-project
@coveo/create-atomic-result-component
@coveo/create-atomic-rollup-plugin
@coveo/headless
@coveo/headless-react
@coveo/shopify
commit: |
alexprudhomme
left a comment
There was a problem hiding this comment.
If we don't need chromatic, what do we really need ? We either run nothing or everything in this case imo. Just excluding chromatic isn't a good long term solution.
@copilot, @alexprudhomme brought a very good point here. We probably can run nothing or close to nothing for changesets branch. |
Agent-Logs-Url: https://github.com/coveo/ui-kit/sessions/fe8d628e-eecc-4ddd-9e26-b0055dcdec1e Co-authored-by: louis-bompart <12366410+louis-bompart@users.noreply.github.com>
Implemented in
Addressed in |
|
@copilot change the scope of the PR: instead of just skipping Chromatic, make it so all if not tests and so on are skipped so that we can expedite the merge of those PR. |
Agent-Logs-Url: https://github.com/coveo/ui-kit/sessions/377fa830-eed2-4941-bd67-84a133eacb05 Co-authored-by: louis-bompart <12366410+louis-bompart@users.noreply.github.com>
Agent-Logs-Url: https://github.com/coveo/ui-kit/sessions/377fa830-eed2-4941-bd67-84a133eacb05 Co-authored-by: louis-bompart <12366410+louis-bompart@users.noreply.github.com>
Done in |
|
Changesets triggers rebuild sometimes, and overall we don't need chromatic here really.