What's your experience with continuous integration?

Hola :wave:,

As you might know, continuous integration is a standard block in software development. It’s the element that ensures that version control changes are in a mergeable state.

The team has started allocating some mental energy to thinking about how Tuist could make an impact in that space, helping teams address various challenges and needs that remain unaddressed. We have some ideas regarding some of the issues based on conversations we had with you in this community forum and on Slack. Still, I’d like to start a discussion and invite you to share more about your setup and experience, as well as what aspects you’d like to see addressed. Think about things like:

  • Indirection that you’d eliminate.
  • Things that feel unnecessarily painful.
  • Workflows and tools that you’ve seen in other ecosystems that you’d like to bring to Apple app development.
  • Ideas that you might have around how to improve the space.

Feel free to respond to this topic. If you have any sensitive information to share, please send it to me privately here or in Slack.

Snapshot testing

One common issue I’ve seen is building the infrastructure in order to support snapshot testing.

Using tools like swift-snapshot-testing is straightforward, but integrating them into CI introduces some complexity.

To name a few things that come to mind:

Storage

  • Committing snapshots directly to git can cause performance issues at scale.
  • Other storage options include Git LFS, Artifactory, S3 — each with trade-offs in cost and setup.

Workflow

  • Are snapshots taken during regular unit test runs? If so, it may slow down normal unit testing, hurting the developer experience.
  • At what point do you upload snapshots to your storage provider?

Developer Experience

  • How are visual diffs shown in PRs?
  • How are changes approved or accepted?
  • Tools like Happo can help here, I’m not familiar with other options here.

Thanks @fdiaz! Snapshot tests is certainly in our roadmap. You’re not the first person having raised this and we think better snapshot management and insights is something we can certainly help developers with.

@fdiaz what does your current setup look like at the moment?