-
Notifications
You must be signed in to change notification settings - Fork 3
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
[UXIT-1471] Optimise Percy snapshots [skip percy] #599
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
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.
Thanks @barbaraperic for looking into this!
don't run tests if PR is in draft
That's great!! It will for sure reduce our usage.
if you include "[skip percy]" in your PR title, only Cypress tests will run (without Percy)
Not an ideal solution as you pointed out, I'm sure I will forget it 😅 Inquirer could be an improvement I think, but I don't know whether it's complicated to set up.
The optimal solution would be to only run Percy on pages that changed, but I don't know how to do that. Maybe it will be possible when we setup NX or Turborepo.
I included husky
I did a test commit locally, and I don't think the linter ran. Did I miss something?
only runs percy on deskop viewport
I feel like we might miss on important information by removing small screens from Percy?
Let me know what you think :)
@barbaraperic - I agree with @CharlyMartin on:
and yes, let's wait until we setup our monorepo structure
🙏🏼 |
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.
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.
Yay! LGTM! ✨
📝 Description
This PR includes a few options to optimise executing Percy Snapshots - see Key Changes. ❗️See part with including husky.
🛠️ Key Changes
[skip percy]
" in your PR title, only Cypress tests will run (without Percy). Not an ideal solution, adds an extra load to think about. I was looking into Inquirer - we could use that library to implement a terminal prompt that could ask "Was there a visual change" when you run "git commit ...", and if the answer is positive that would add a condition to github actions to include Percy (otherwise it wouldn't include it in Cypress tests). I was playing around tho, but couldn't make it work. Could give it another go if you all think it would be a better solution.npm run lint
before you push to the branch. Let me know if you want to keep it, or I can remove it.percy
on deskop viewport - that reduces snapshots from 24 per commit to 12 per commit.📸 Screenshots
🔖 Resources