purchases-ios icon indicating copy to clipboard operation
purchases-ios copied to clipboard

Allow CircleCI to generate new test snapshots

Open joshdholtz opened this issue 2 years ago • 3 comments

Depends on https://github.com/RevenueCat/purchases-ios/pull/1589

Motivation

Our snapshot testing sometimes needs regeneration and it requires regeneration of iOS 12. iOS 12 simulators only run on Intel machines and not all of us have them.

This PR will allow a CircleCI job to be manually triggered to regenerate snapshot tests

Description

Step 1: Trigger CircleCI workflow

Run bundle exec fastlane generate_snapshots

Step 2: Run CircleCI workflow with generate snapshots

This will start a series of jobs on CircleCI that will have the CIRCLECI_TESTS_GENERATE_SNAPSHOTS set to true that will regenerate new/updated snapshot test assets.

Screen Shot 2022-05-12 at 9 02 43 PM

Step 3: Create pull requests

If there are any files changed, a new PR will be created against the base branch (set earlier in the generate_snapshots lane)

Example PR 👉 https://github.com/RevenueCat/purchases-ios/pull/1578

Screen Shot 2022-05-12 at 8 57 46 PM

joshdholtz avatar May 11 '22 02:05 joshdholtz

@NachoSoto Pushed a commit where no Xcode formatter (raw output) will be used when generating snapshots!

joshdholtz avatar May 19 '22 01:05 joshdholtz

Looks like this is working 🎉 Screen Shot 2022-05-20 at 11 33 21

But let's run it against #1560 to see if it generates the new ones correctly too.

NachoSoto avatar May 20 '22 18:05 NachoSoto

what's the status of this one?

aboedo avatar May 26 '22 20:05 aboedo

Should we close this for now?

NachoSoto avatar Dec 06 '22 02:12 NachoSoto

Ahhh... this one was super frustrating! CircleCI wasn't generating the things properly even though it should have. Probably should close it 😬

joshdholtz avatar Dec 06 '22 14:12 joshdholtz

We can pair to finish it, I'm sure it's almost ready?

NachoSoto avatar Dec 06 '22 14:12 NachoSoto

I'd be down to pair sometime 😊

joshdholtz avatar Dec 06 '22 15:12 joshdholtz

Closing in favor of #2472.

NachoSoto avatar May 12 '23 19:05 NachoSoto