All Projects → react-native-community → React Native Circleci Orb

react-native-community / React Native Circleci Orb

Licence: mit
A CircleCI Orb to Simplify Testing your React Native App

Programming Languages

shell
77523 projects

Projects that are alternatives of or similar to React Native Circleci Orb

Automation Arsenal
Curated list of popular Java and Kotlin frameworks, libraries and tools related to software testing, quality assurance and adjacent processes automation.
Stars: ✭ 105 (-16.67%)
Mutual labels:  integration-testing
Circleci Bundle Update Pr
Provide continues bundle update using CircleCI
Stars: ✭ 115 (-8.73%)
Mutual labels:  circleci
Ci Matters
Integration (comparison) of different continuous integration services on Android project
Stars: ✭ 119 (-5.56%)
Mutual labels:  circleci
Gest
👨‍💻 A sensible GraphQL testing tool - test your GraphQL schema locally and in the cloud
Stars: ✭ 109 (-13.49%)
Mutual labels:  integration-testing
Android Livedata Viewmodel
Android app that demonstrates how to use new Architecture components.
Stars: ✭ 114 (-9.52%)
Mutual labels:  circleci
Greenlight
Clojure integration testing framework
Stars: ✭ 116 (-7.94%)
Mutual labels:  integration-testing
Circleci Demo Ios
A sample iOS app that builds on CircleCI
Stars: ✭ 103 (-18.25%)
Mutual labels:  circleci
Next Page Tester
DOM integration testing for Next.js
Stars: ✭ 122 (-3.17%)
Mutual labels:  integration-testing
Circleci Demo Javascript Express
Sample Javascript/Express app building on CircleCI
Stars: ✭ 115 (-8.73%)
Mutual labels:  circleci
Cypress Example Docker Circle
Cypress + Docker + CircleCI = ❤️
Stars: ✭ 119 (-5.56%)
Mutual labels:  circleci
Presently
Android app for recording gratitude journal entries
Stars: ✭ 109 (-13.49%)
Mutual labels:  circleci
Drupal8ci
One-line installers for implementing Continuous Integration in Drupal 8
Stars: ✭ 113 (-10.32%)
Mutual labels:  circleci
Circleci Demo Workflows
Demonstrations of various Workflows features
Stars: ✭ 116 (-7.94%)
Mutual labels:  circleci
Terraform Multienv
A template for maintaining a multiple environments infrastructure with Terraform. This template includes a CI/CD process, that applies the infrastructure in an AWS account.
Stars: ✭ 107 (-15.08%)
Mutual labels:  circleci
Circleci Orb
Install, cache and run Cypress.io tests on CircleCI with minimal configuration.
Stars: ✭ 121 (-3.97%)
Mutual labels:  circleci
Pytest Monitor
Pytest plugin for analyzing resource usage during test sessions
Stars: ✭ 105 (-16.67%)
Mutual labels:  integration-testing
Bento Starter
🍱 Full-Stack solution to quickly build PWA applications with Vue.js and Firebase
Stars: ✭ 1,519 (+1105.56%)
Mutual labels:  circleci
Testcontainers Rs
A library for integration-testing against docker containers from within Rust.
Stars: ✭ 124 (-1.59%)
Mutual labels:  integration-testing
Kubetest
Kubernetes integration testing in Python via pytest
Stars: ✭ 122 (-3.17%)
Mutual labels:  integration-testing
Movieapp
🎬 MovieApp is a Flutter application built to demonstrate the use of modern development tools with best practices implementation like Modularization, BLoC, Dependency Injection, Dynamic Theme, Cache, Shimmer, Testing, Flavor, CI/CD, etc.
Stars: ✭ 117 (-7.14%)
Mutual labels:  integration-testing

React Native CircleCI Orb

CircleCI Orb

A CircleCI Orb to simplify testing your React Native app.

Why?

Setting up CircleCI to test your React Native app correctly is hard. You need to consider using the correct machine type, installing the correct dependencies, running the correct commands, and correctly setting up caching to speed up builds. All of this is complicated and involves a lot of trial and error.

With this Orb we provide simple reusable building blocks which you can use to do the right thing easily.

Overview

First, we recommend reading the Using Orbs guide from the CircleCI documentation to get an overview of how to use Orbs.

This Orb provides three different categories of tools to help you build and test your React Native app on CircleCI:

  • Executors: Machines which are configured for use with React Native.
  • Commands: Individual tasks which you can piece together in your own jobs to perform tasks like installing dependencies, building an APK, or running Detox tests.
  • Jobs: Groups of commands which are typically used together as a stage in a pipeline.

Setup

Firstly, as this is a 3rd Party Orb, you need to go into your organisations settings, press on "Security", and enable usage of 3rd Party Orbs.

You will also need to ensure that you have a MacOS plan enabled if you want to build and test your iOS app, or if you want to test your Android app. Open Source projects can contact CircleCI to ask them to enable it and private projects need to select a payment plan.

Documentation

You can read the full documentation here.

Android

Add this task in your /app/build.gradle

task downloadDependencies() {
  description 'Download all dependencies to the Gradle cache'
  doLast {
    configurations.findAll().each { config ->
      if (config.name.contains("minReactNative") && config.canBeResolved) {
        print config.name
        print '\n'
        config.files
      }
    }
  }
}

Example

Here is a full example of how the Orb can be used in a CircleCI workflow to build and test a React Native app:

# Orb support is from version >= 2.1
version: 2.1

# Make sure you use the latest version of the Orb!
orbs:
  rn: react-native-community/[email protected]

# Custom jobs which are not part of the Orb
jobs:
  checkout_code:
    executor: rn/linux_js
    steps:
      - checkout
      - persist_to_workspace:
          root: .
          paths: .
  analyse_js:
    executor: rn/linux_js
    steps:
      - attach_workspace:
          at: .
      - rn/yarn_install
      - run:
          name: Run ESLint
          command: yarn eslint
      - run:
          name: Flow
          command: yarn flow
      - run:
          name: Jest
          command: yarn jest

workflows:
  test:
    jobs:
      # Checkout the code and persist to the Workspace
      # Note: This is a job which is defined above and not part of the Orb
      - checkout_code

      # Analyze the Javascript using ESLint, Flow, and Jest
      # Note: This is a job which is defined above and not part of the Orb
      - analyse_js:
          requires:
            - checkout_code

      # Build the Android app in debug mode
      - rn/android_build:
          name: build_android_debug
          project_path: "android"
          build_type: debug
          requires:
            - analyse_js

      # Build and test the Android app in release mode
      # Note: We split these into seperate jobs because we can build the Android app on a Linux machine and preserve the expensive MacOS executor minutes for when it's required
      - rn/android_build:
          name: build_android_release
          project_path: "android"
          build_type: release
          requires:
            - analyse_js
      - rn/android_test:
          detox_configuration: "android.emu.release"
          requires:
            - build_android_release


      # Build the iOS app in release mode and do not run tests
      - rn/ios_build:
          name: build_ios_release
          project_path: ios/Example.xcodeproj
          device: "iPhone X"
          build_configuration: Release
          scheme: Example
          requires:
            - analyse_js

      # Build and test the iOS app in release mode
      - rn/ios_build_and_test:
          project_path: "ios/Example.xcodeproj"
          device: "iPhone X"
          build_configuration: "Release"
          scheme: "Example"
          detox_configuration: "ios.sim.release"
          requires:
            - analyse_js

This is what the final workflow will look like:

Example React Native CircleCI Orb Workflow

License

The Orb is released under the MIT license. For more information see LICENSE.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].