-
Notifications
You must be signed in to change notification settings - Fork 49
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enable chromatic turbosnap #2198
Enable chromatic turbosnap #2198
Conversation
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #2198 +/- ##
=======================================
Coverage 85.10% 85.10%
=======================================
Files 133 133
Lines 2860 2860
Branches 864 864
=======================================
Hits 2434 2434
Misses 397 397
Partials 29 29 ☔ View full report in Codecov by Sentry. |
.github/workflows/chromatic.yml
Outdated
branches: | ||
- main | ||
- alpha | ||
pull_request: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
이렇게 되면 모든 포크된 레포지토리의 push에 트리거될텐데 괜찮을까요?
기존 트리거 로직에도 github.repository == 'channel-io/bezier-react'
조건이 없었어서 포크된 레포지토리에서도 PR 생성/업데이트 시 트리거 됐을 거 같긴하지만요
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
말씀하신대로 기존 트리거 로직도 포크된 repo의 pr에서도 크로마틱이 돌고 있고, push 이후 보통 pr을 만드니 push 이벤트가 기존의 트리거 로직과 크게 차이가 없을 것이라고 생각했습니다.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PR에 포함되지 않은 포크된 repo의 커밋(푸시)에 대해서도 워크플로가 계속 트리거되어야하나 싶었어요. 크로마틱 토큰이 공개되어 있어서 의도만 있다면 악용될 여지는 항상 있겠지만, 모든 커밋에 대해서 트리거된다면 의도하지 않은 경우에도 로컬 테스트 등으로 스토리 스냅샷 양이 불필요하게 늘어나거나 할 수 있을 거 같아서요.
turbosnap문서에서 pull_request가 아닌 push를 이벤트 트리거로 사용하라고 권장하고 있어서
이 부분의 이유가 궁금했습니다. pull_request로 하면 어떤 문제가 발생하는지?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
공식 문서에서 pull_request 를 사용하면 diff 를 구하기 위해 조상을 찾지 못할 수 있다고 합니다.
pr 에 포함되지 않은 푸쉬에 대해서 크로마틱이 안돌게 하는 방법을 찾아볼게요.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
push로 하면 마지막 커밋이 packages/bezier-react/ 밖에서 발생하면 크로마틱 빌드가 트리거되지 않는 문제가 있긴 하네요(이슈). 한편으로는 https://github.com/guardian/dotcom-rendering 여기서 turbosnap 을 pull_request 이벤트와 함께 사용하는 히스토리가 있어서 이걸 이해하고 도입해보는 방향을 고려중입니다!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
GA 어렵네요...ㅎㅎ 저도 링크 확인해봤는데 좋은 거 같습니다! 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- trigger on push event regardless of branches - enable turbosnap
4afea60
to
5d0909b
Compare
<!-- How to write a good PR title: - Follow [the Conventional Commits specification](https://www.conventionalcommits.org/en/v1.0.0/). - Give as much context as necessary and as little as possible - Prefix it with [WIP] while it’s a work in progress --> ## Self Checklist - [x] I wrote a PR title in **English** and added an appropriate **label** to the PR. - [x] I wrote the commit message in **English** and to follow [**the Conventional Commits specification**](https://www.conventionalcommits.org/en/v1.0.0/). - [x] I [added the **changeset**](https://github.com/changesets/changesets/blob/main/docs/adding-a-changeset.md) about the changes that needed to be released. (or didn't have to) - [x] I wrote or updated **documentation** related to the changes. (or didn't have to) - [x] I wrote or updated **tests** related to the changes. (or didn't have to) - [x] I tested the changes in various browsers. (or didn't have to) - Windows: Chrome, Edge, (Optional) Firefox - macOS: Chrome, Edge, Safari, (Optional) Firefox ## Related Issue <!-- Please link to issue if one exists --> <!-- Fixes #0000 --> - #2246 와 관련있어보입니다. ## Summary <!-- Please brief explanation of the changes made --> - main branch 푸쉬할 떄 크로마틱 빌드가 되지 않고 있습니다. #2198 에서 잘못 삭제된 push 트리거를 되살립니다. ## Details <!-- Please elaborate description of the changes --> - None ### Breaking change? (Yes/No) <!-- If Yes, please describe the impact and migration path for users --> - No ## References <!-- Please list any other resources or points the reviewer should be aware of --> - None
Self Checklist
Related Issue
Summary
Details
Help
컴포넌트를 바꾸는 경우: 디펜던시 그래프에서 Help와 연결된 부분 (Help, FormLabel, FormControl, Modal, Button 등)이 변화가 있다고 판단하고 관련된 스토리 22개만 스냅샷으로 찍습니다(#). Modal이나 Button이 연결되어 있다고 판단하는 것은 스토리에서 FormLabel, FormControl을 사용하고 있어서 그렇습니다.AlphaButton
컴포넌트를 바꾸는 경우:AlphaButton
에 의존하는 컴포넌트가 없기 때문에 스냅샷 하나만 찍게 됩니다 (#).Breaking change? (Yes/No)
References