What do you use for testing and CI for expo/RN?


#1

Good morning all!

Hope you all had a great Memorial Day (US)! I’m curious as to what tools to implement for a smooth working flow for testing and CI. I’m looking into Jest + Travis combo, it seems to work well for fb, so why not try it out for myself.

So, what do you use for testing and CI with expo/RN?

Thank you and have an Amazing Week!
Hendricx


#3

Hi @hskb10!

Our story around CI isn’t that great right now – but we have items in our pipeline to make it better.

For now – you can use our CLI, exp, in a CI context. https://github.com/expo/exp

Right now, we don’t have service account tokens, so you actually need to authenticate by putting a username/password in CI environment variables, and authenticating like: exp login --username $EXPO_USERNAME --password $EXPO_PASSWORD. In the future, we’ll offer service account based authentication.

The other important thing, especially when using a hosted CI provider (such as Travis), you’ll need to make sure the packager runs in “non-persistent” mode so that it doesn’t take up large numbers of inodes on the CI machine.

You can do this in Expo by adding a packagerOpts key in your exp.json, and setting nonPersistent to true:

{ ...the rest of your exp.json, packagerOpts: { nonPersistent: true } }

As far as using Jest as your test framework, that’s what I would recommend!

Hope this helps.

-Adam


#4

Awesome @skevy! Thank you for the advice, will play around and see w/c one is the better fit!