Repository navigation
chore: configure chromatic snapshot tests - #896
Conversation
Resolves: #444 Summary: This commit installs and configures a GH action for chromatic. Chromatic is used for snapshot testing build-over-build. Details: * chore(site): install chromatic * chore(site): add chromatic package.json script Suggested by the docs for convenience so that we can run chromatic like: ```console yarn run chromatic ... ``` * chore: gitignore storybook builds * ci: configure chromatic This action configures chromatic to run in CI on pushes to all branches. By running this in CI, we get the following: - snapshot (build-over-build) - checks in our CI The snapshots and build-over-build behavior are per branch; this way we can work on a feature branch without worrying about changes being made to mainline independently.
Codecov Report
@@ Coverage Diff @@
## main #896 +/- ##
==========================================
+ Coverage 65.77% 65.96% +0.18%
==========================================
Files 216 216
Lines 13734 13734
Branches 103 103
==========================================
+ Hits 9033 9059 +26
+ Misses 3782 3761 -21
+ Partials 919 914 -5
Continue to review full report at Codecov.
|
This is now the responsibility of Chromatic
kylecarbs
left a comment
There was a problem hiding this comment.
I tried to fix this with the semantic config, but I'd prefer if we kept the syntax simple and stopped using (). I think a more explicit ending message helps reads interpret a consistent format.
I'd like to enforce this with CI, but I did a bad job haha!
Something like: chore: configure Chromatic snapshot tests
Updated PR title, I'll ensure I squash with the same title! Thanks for identifying this, I agree we can omit scopes for now. |
|
@presleyp and @BrunoQuaresma I'm merging this right now because it will help us with the current in-flight PRs that add storybook rather than later. |
This is an oversight from #896 . It turns out that because we use the GitHub integration with Chromatic, we don't need to wait for the results to be reported in the action - they get reported in the other checks created by Chromatic. This option was spit-out in a check: https://github.com/coder/coder/runs/5859427236?check_suite_focus=true#step:4:38 Relates to #444
This is an oversight from #896 . It turns out that because we use the GitHub integration with Chromatic, we don't need to wait for the results to be reported in the action - they get reported in the other checks created by Chromatic. This option was spit-out in a check: https://github.com/coder/coder/runs/5859427236?check_suite_focus=true#step:4:38 Relates to #444
Resolves: #444
Summary
This commit installs and configures a GH action for chromatic. Chromatic
is used for snapshot testing build-over-build.
Details
chore(site): install chromatic
chore(site): add chromatic package.json script
Suggested by the docs for convenience so that we can run chromatic like:
yarn run chromatic ...chore: gitignore storybook builds
ci: configure chromatic
This action configures chromatic to run in CI on pushes to all branches.
By running this in CI, we get the following:
The snapshots and build-over-build behavior are per branch; this way we
can work on a feature branch without worrying about changes being made
to mainline independently.
Impact
This is largely an internal workflow chore, it has no user/product-facing impact.