Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 13 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -167,12 +167,18 @@ jobs:
# secrets. Main has to publish too, or a pull request would have no
# baseline to compare to.
#
# No `--exit-zero-on-changes`: a visual change fails the pull request
# until someone accepts it in the Chromatic UI and re-runs this job. The
# snapshots are deterministic, so a change is never noise -- either the
# pull request meant it, and accepting is the review working, or it
# touched nothing near that example and red is the right answer. Build 42
# went green with exactly such a change waiting unreviewed.
# `--exit-zero-on-changes`: a visual change is Chromatic's to report, not
# this job's. The job answers "did the upload work?"; the UI Tests check
# Chromatic posts on the commit answers "should this have changed?", and
# it stays red until someone accepts the build -- no re-run of this job
# needed. Failing here on top of that said "broken" where the truth was
# "waiting for you", and it hid a real one: a `pnpm chromatic` that
# cannot upload looks exactly like 68 snapshots pending review.
#
# That requires the Chromatic GitHub app to be installed on the
# repository, which is what publishes the UI Tests check. Without it a
# changed build reports nothing at all, and this flag is how changes pile
# up unreviewed -- build 42 went green with exactly one waiting.
#
# `--auto-accept-changes` on main, and only there. What lands on main has
# already been accepted on its pull request, so asking a second time
Expand All @@ -185,7 +191,7 @@ jobs:
# times, and the nightly is what keeps asking. Chromatic answers "should
# this have changed?", which only makes sense once the answer to "did
# anything change by itself?" is no.
- run: pnpm chromatic ${{ github.ref == 'refs/heads/main' && '--auto-accept-changes' || '' }}
- run: pnpm chromatic ${{ github.ref == 'refs/heads/main' && '--auto-accept-changes' || '--exit-zero-on-changes' }}
if: ${{ env.CHROMATIC == 'true' }}
env:
CHROMATIC_PROJECT_TOKEN: ${{ secrets.CHROMATIC_PROJECT_TOKEN }}
Expand Down
Loading