GithubHelp home page GithubHelp logo

johnwakley / github-explorer-react-native Goto Github PK

View Code? Open in Web Editor NEW
2.0 4.0 0.0 17.1 MB

This is a demo React Native app for exploring trending and most popular GitHub repositories.

License: MIT License

JavaScript 82.15% Python 6.09% Java 1.54% Shell 1.69% Ruby 4.07% Objective-C 4.47%

github-explorer-react-native's Introduction

github-explorer-react-native

This is a demo React Native app for exploring trending and most popular GitHub repositories.

Features:

  • iOS and Android builds
  • Relay Modern integration with GitHub GraphQL API
  • React Navigation with platform specific UI idioms
  • UI Automation testing with Appium

Getting Started

  1. Complete the React Native Getting Started guide for iOS and Android:
  1. Install yarn. This is an optional step, you can substitute yarn for npm in the instructions that follow.
  1. Generate an OAuth token to access the GitHub GraphQL API
  1. Clone repo and install dependencies:
git clone https://github.com/johnwakley/github-explorer-react-native && cd github-explorer-react-native
yarn install
  1. In the .env and .env.production files located at the root of the project, substitute text, REPLACE_WITH_YOUR_ACCESS_TOKEN, with the OAuth token created in step 3.
  2. From the project root,
  • Run the app on the iOS simulator:
    • react-native run-ios
  • For the Android build, first, launch the emulator configured in Step 1, then run:
    • react-native run-android

Running Unit Tests

yarn test

Flow static analysis and JS Standard linting are performed before unit and snapshot tests are run.

Running Integration Tests

Appium is used to drive automated UI tests for the iOS and Android builds.

Getting Started

  1. Install Appium:
npm install -g appium  # get appium
npm install wd         # get appium clien
  1. The appium tests are written in python and use the python appium client library, which also needs to be installed:
pip install Appium-Python-Client
pip install pytest
  1. Ensure this script: e2e/appium_bootstrap.sh, has execute permissions. It does the following:
  • Creates a release Android app build
  • Starts the Android emulator. The script is currently configured to start the emulator named: Nexus_5X_API_25_x86. Replace, if neccessary, with the name of the emulator you created in the React Native Getting Started guide
  • Starts the Appium server
  • Runs the Android UI Automator tests defined in e2e/android_tests.py
  • Creates an iOS build using Fastlane
  • Runs the iOS UI Automation tests defined in e2e/ios_tests.py
  • Reports test results
  • Completes by stopping the Appium server and device emulator and simulators.
  1. Before running the appium tests, you will need to generate a keystore file that is used to create a signed APK. Instructions can be found here: Generating Signed APK
  • Replace the following section of android/app/build.gradle, with the details of your own keystore:
storeFile file("github-explorer.keystore")
storePassword getPassword("github-explorer-apk-keystore")
keyAlias "github-explorer-key"
keyPassword getPassword("github-explorer-apk-key")
  1. Finally, you can now run the appium tests:
yarn test:system

Further Reading

To learn more about the libraries used in this project, check out these links:

github-explorer-react-native's People

Contributors

johnwakley avatar

Stargazers

 avatar Nelson Tam avatar

Watchers

James Cloos avatar  avatar Alexey Pyltsyn avatar james allain avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.