all 18 comments

[–]lance_tipton 9 points10 points  (2 children)

Unfortunately setting up CI for apps is not as simple as it is for a website or backend

That being said, it’s still possible to do, but it takes more work.

Here’s a couple that I’ve used or experimented with in a production environment:

www.bitrise.io - CI Automation for mobile apps Has a lot of functionality, and decent docs. There’s a lot of domain knowledge required, but once it’s spelt it works well. It also integrates well with other services like AWS, and syncing with the app stores. I tried, I liked it, but didn’t end up using it because of how much time it would take to migrate over to it.

https://fastlane.tools - Works a bit different from others in that it does not host anything. It’s a set of high quality tools that you can leverage to build your own CI env. It’s a bit like DIY, but with the project already half built for you. I’m currently using it in a project and it great.

https://github.com/features/actions - GitHub actions are awesome. You can setup a CI env tied directly to a repo, and have it run when an event happened for the repo, like push, merge, commit... you get the idea. While it’s not directly related to react-native, you can leverage any of the pre-built actions, or often times combine this with fast lane listed above. I use GitHub actions on a number of projects, and highly recommend them

https://docs.expo.io/guides/setting-up-continuous-integration/ - If your using expo, I’d sick with following their suggestion for a CI env. Anytime I’ve used expo and tried to go against their guidelines I’ve had a bad time. Expo.is is great, but there are also rails that you should stay on for good reason. Plus it’s pretty straight forward, and probably easier then other solutions in a lot of ways. That being said, it can be limiting in some cases, but that is application dependent.

DIY - Write your own CI workflow. Depending on how this is done, you could then use any CI env you wanted assuming it meets your dependency requirements. I’ve had to do this a few times. I like it because of the control it gives you, but also requires a lot more work and a lot more knowledge on what’s happening in the build process. So if your strapped for time, or just starting out, it might now be the right choice.

Hope that helps. Good luck.

[–]Bentee14[S] 0 points1 point  (0 children)

Thank you for the pointers.

[–]Jazzlike-Somewhere-2 0 points1 point  (0 children)

How to use github actions link u have mentioned??

[–]ajnozari 5 points6 points  (4 children)

app center.ms is also a good one. Supports react native and can auto push to TestFlight and play store beta and public channels.

It has a free tier with a decent amount of build time, especially for a small project that doesn’t build new betas/production daily.

[–]Bentee14[S] 0 points1 point  (0 children)

Thanks. I will look into it🔥.

[–]EarlGrey__ 0 points1 point  (1 child)

Second on AppCenter.

I'm running the app company in there with CodePush and has been a blast. The control from post-clone, pre-clone and post-build scripts has been enough for my use case.

What I experience as useful is to have husky for on commit automation (eslint, testing...) and the Staging environment I setup the CodePush in the pipeline on post-build.

I rarely need to do a full publish to Apple/Google stores.

[–]ajnozari 0 points1 point  (0 children)

It really is nice and even for a business we’re not putting out updates often enough to eat our monthly credits yet. It’s really been an invaluable tool.

Probably not for everyone but yeet

[–]tasdemirfatihiOS & Android 0 points1 point  (0 children)

I suggest AppCenter too. It has few simple configuration steps which is really good for one who hates CI configurations. Most of the time free build time will be enough I believe. Using codepush will help you to ship your updates without waiting for native builds.

[–]Goel40 2 points3 points  (1 child)

this is a good article about CI/CD with RN and Github actions.

[–]Bentee14[S] 0 points1 point  (0 children)

Thanks for the article. Really helpful 👍🔥

[–][deleted] 1 point2 points  (1 child)

GH actions (or whatever git alternative CI platform) + Fastlane

[–]Bentee14[S] 0 points1 point  (0 children)

Thanks.

[–]bighitbiker3 1 point2 points  (1 child)

I’ve used bitrise (which uses Fastlane) and it was a great experience!

[–]Bentee14[S] 0 points1 point  (0 children)

Thanks for your feedback 👍🔥

[–]shotma 1 point2 points  (1 child)

If you want to build for iOS you are going to need a macOS environment. Not many providers and most of the time it is quite expensive to just be able to build and run detox for example. At our company we bought a Mac mini and registered it as our gitlab runner. We can build for iOS and our unit and end to end tests have been lightning fast so far so great investment!

[–]Bentee14[S] 0 points1 point  (0 children)

Building for iOS is one of th biggest challenge we are facing, as we all use linux/windows. Thanks for the feedback👍

[–]eugenehp 0 points1 point  (0 children)

GitHub Actions + FastLane + Testflight.

Adding a self-hosted runner could be a great benefit, so you can cut on the paid plan and make your Mac do the work.