pointfreeco / swift-snapshot-testing

📸 Delightful Swift snapshot testing.
https://www.pointfree.co/episodes/ep41-a-tour-of-snapshot-testing
MIT License
3.72k stars 565 forks source link

[Request] Avoid automatically recording snapshots on CI #748

Closed NachoSoto closed 1 month ago

NachoSoto commented 1 year ago

I'm experimenting with moving to Xcode Cloud, and noticed that for some reason it's not finding the snapshots even though they're in the repo. Because we have test retries enabled, I almost didn't see this, because the second try for every test passed:

Screenshot 2023-07-20 at 13 02 36

It occurs to me that it should be able to disable this behavior when running tests on CI, because the subsequent test run will always be a pass. If there is no snapshot when running tests on CI, it shouldn't try to create them.

Bonus points if there's an environment variable that the library can detect to automatically enable that setting in Xcode Cloud / CircleCI, etc.

NachoSoto commented 1 year ago

I just discovered https://github.com/pointfreeco/swift-snapshot-testing/discussions/553 I understand there's nothing that this framework can do to make that automatic, but at least I think it would be nice to make the issue more obvious. If I hadn't noticed the retries I wouldn't have noticed that this was broken.

alexanderkhitev commented 10 months ago

Hey guys! Any news/updates? Thanks

Smponias commented 4 months ago

Any Updates?