-
Notifications
You must be signed in to change notification settings - Fork 35
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
fix: tests fails on CI while using the default config #117
Comments
@pedromassango could you provide a sample (failing) test? I assume that it's passing locally? If so, what platform are you running locally? |
It is a private project, you can reproduce with a simple golden test using alchemist |
Could you answer the other questions I had? Thank you! |
MacOS Sorry, I missed this thread |
I looked into this today and was not able to reproduce. I have a sample repo here. The test is here. A successful CI run was here. In case you're not able to see that, I've attached a screenshot of the run below. Of note, the CI goldens were produced on CI itself via this workflow. This has proven to be very reliable for us at Betterment to avoid any oddities in the way Flutter UI renders on different platforms, even when text is accounted for via the I'm going to close this as I don't think there's an action item for us, but please do feel free to open again if you have a reproducing sample or any questions. Thank you! |
@btrautmann thank you, seems the only way to make the CI test to work. How to you make sure a new PR won't break a Widget? |
Correct, testing a |
That is amazing, I couldn't really find this information anywhere else, so just to make sure I got this right: The flow is:
Is that the flow I should aim for & you are using internally? |
@pedromassango yeah you are correct, that's pretty much the workflow. The bit there that isn't done for you out of the box is the generation of goldens via CI. There is a bit of discussion around the matter here, but nothing is currently planned at this time to make this automatic. At Betterment, our general flow is:
From our standpoint, we don't really even use platform goldens except for local validations. PS: Much of this is mentioned in the setup guide, worth a read! |
That is nice.
Would be nice to have an automation for this too. Anyway, thans for sharing, I believe now it is clear in what worflow to have with golden tests |
Hi @btrautmann I have another question, does that means, for the first time, I should first open a PR with the golden tests & My current setup is failing because the first images were generated on my laptop (macOs) and during CI the comparison fails |
Is there an existing issue for this?
Version
0.7.0
Description
Test fails in CI with the default configuration, it works locally with
flutter run test
Config:
Steps to reproduce
use the setup code above, generate any golden test and make it run on CI with a linux env, see CI failing with:
Expected behavior
test should pass
Screenshots
No response
Additional context and comments
No response
The text was updated successfully, but these errors were encountered: