Semaphore demo CI/CD pipeline using React Native
Example application and CI/CD pipeline showing how to run a React Native project on Semaphore 2.0. Uses React Native CLI Quickstart.
CI/CD on Semaphore
- Fork this repository and use it to create a project.
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 Andoroid CI, change pipeline file to run android.yml
:
The CI pipeline will look like this (Android):
The example pipeline contains 4 blocks:
- Install dependencies
- installs and caches all npm dependencies
- Run linter
- Lint the code using eslint with @react-native-community/eslint-config
- Run tests
- Build app
- Uses Fastlane as build automation tool (with a refference to Fastlane — Simple React Native iOS Releases and Fastlane — Simple React Native Android Releases)
Local project setup
Installation
$ npm install
Running the app
$ npm start
Lint
$ npm run lint
Unit and integration tests
$ npm test
e2e UI tests iOS
$ npm run detox-ios-build
$ npm run detox-ios-test
e2e UI tests android
$ npm run detox-android-build
$ npm run detox-android-test
License
Copyright (c) 2019 Rendered Text
Distributed under the MIT License. See the file LICENSE.md.