Skip to content

Conversation

greyscaled
Copy link
Contributor

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:

  • 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.

Impact

This is largely an internal workflow chore, it has no user/product-facing impact.

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.
@greyscaled greyscaled requested a review from a team as a code owner April 6, 2022 20:41
@greyscaled greyscaled self-assigned this Apr 6, 2022
@codecov
Copy link

codecov bot commented Apr 6, 2022

Codecov Report

Merging #896 (3df9af1) into main (fe23dcd) will increase coverage by 0.18%.
The diff coverage is n/a.

@@            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     
Flag Coverage Δ
unittest-go- 65.58% <ø> (+0.03%) ⬆️
unittest-go-macos-latest 52.87% <ø> (-0.12%) ⬇️
unittest-go-ubuntu-latest 55.26% <ø> (-0.09%) ⬇️
unittest-go-windows-2022 52.13% <ø> (+0.02%) ⬆️
unittest-js 58.87% <ø> (ø)
Impacted Files Coverage Δ
cli/cliui/agent.go 77.19% <0.00%> (-5.27%) ⬇️
peer/channel.go 83.04% <0.00%> (-2.93%) ⬇️
provisioner/echo/serve.go 56.80% <0.00%> (-2.41%) ⬇️
peer/conn.go 78.93% <0.00%> (-2.04%) ⬇️
provisionerd/provisionerd.go 80.17% <0.00%> (-0.59%) ⬇️
peerbroker/proxy.go 61.62% <0.00%> (+3.48%) ⬆️
coderd/provisionerdaemons.go 63.57% <0.00%> (+4.55%) ⬆️
peerbroker/dial.go 83.60% <0.00%> (+6.55%) ⬆️
coderd/database/db.go 68.96% <0.00%> (+13.79%) ⬆️
pty/start_other.go 88.23% <0.00%> (+23.52%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update fe23dcd...3df9af1. Read the comment docs.

Copy link
Member

@kylecarbs kylecarbs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@greyscaled greyscaled changed the title chore(site): configure chromatic snapshot tests chore: configure chromatic snapshot tests Apr 6, 2022
@greyscaled
Copy link
Contributor Author

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.

@greyscaled
Copy link
Contributor Author

@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.

@greyscaled greyscaled merged commit 5782879 into main Apr 6, 2022
@greyscaled greyscaled deleted the vapurrmaid/444/chromatic branch April 6, 2022 21:51
greyscaled added a commit that referenced this pull request Apr 6, 2022
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
greyscaled added a commit that referenced this pull request Apr 6, 2022
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
@misskniss misskniss added this to the V2 Beta milestone May 15, 2022
mafredri added a commit that referenced this pull request Aug 22, 2025
mafredri added a commit that referenced this pull request Aug 22, 2025
mafredri added a commit that referenced this pull request Aug 25, 2025
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.

Test | UX | Storybook snapshot testing (build-over-build) for regression prevention
5 participants