Example application and CI/CD pipeline showing how to run a React Native project on Semaphore 2.0. Uses React Native CLI Quickstart.
The CI pipeline will look like this:
To run just iOS CI, change pipeline file to run ios.yml
:
The CI pipeline will look like this (iOS):
To run just Android CI, change pipeline file to run android.yml
:
The CI pipeline will look like this (Android):
The example pipeline contains 4 blocks:
$ npm install
$ npm start
$ npm run lint
$ npm test
$ npm run detox-ios-build
$ npm run detox-ios-test
$ npm run detox-android-build
$ npm run detox-android-test
If while runing your end to end tests on iOS you get this error #error Unsupported architecture
make sure that the detox configuration uses the ONLY_ACTIVE_ARCH=YES
flag as shown in the package.json file.
Author: semaphoreci-demos
Source Code: https://github.com/semaphoreci-demos/semaphore-demo-react-native
#react-native #react #mobile-apps