Coder Social home page Coder Social logo

calitb / expo-e2e-demo Goto Github PK

View Code? Open in Web Editor NEW
36.0 1.0 3.0 652 KB

Expo application with detox to run e2e using Github Workflow

TypeScript 8.86% Starlark 3.97% Java 37.65% JavaScript 8.59% Objective-C 0.80% Swift 0.23% Ruby 3.34% Shell 5.53% Makefile 3.10% C++ 14.37% Objective-C++ 13.55%
expo e2e reactnative detox

expo-e2e-demo's Introduction

runs with Expo Go E2E (iOS) E2E (Android)

Expo e2e Demo

Application template to demonstrate how to run e2e in an Expo Managed application using Detox

Tested using:

  • MacOS 12.1 Monterrey, M1 Pro
  • ExpoCli v5.0.2
  • CocoaPods v1.11.2

Dependencies

xcode-select --install
npm install -g detox-cli
brew tap wix/brew
brew install applesimutils

Configure Expo

Install Expo CLI:

npm install -g expo-cli

Run the app

yarn start:go

and scan the QRCode with your iOS Camera, or Android Expo app.

Run the e2e

yarn e2e:ios

Check the wiki in this repo to see how to setup this in your project.

Running e2e using EAS (Expo Application Server)

See the detailed guide here.

Run yarn run eas-e2e to build the app and run the tests.

Notice the file .github/workflows/deployment.yml runs the e2e on each comnmit to the main branch.

Remember to create your EXPO_TOKEN here, and add it to your repository following this guide

expo-e2e-demo's People

Contributors

calitb avatar karlhorky avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

expo-e2e-demo's Issues

Question: Screenshots

Everything works for me. Thank you for your work. I do have a question - why do you create screenshots into .artifacts folder and meta folder ?

bootup takes a lot of time

Hi, so I just used this workflow to run my tests of react-native(not expo) based app. The emulator boot time takes around 15 minutes sometimes more than 15 minutes. Is this normal? Or should I do something to improve it.

- uses: actions/setup-java@v3
        with:
          distribution: 'corretto' # See 'Supported distributions' for available options
          java-version: '11'
          cache: 'gradle'
        env:
          # https://github.com/actions/toolkit/issues/641#issuecomment-728963957
          ACTIONS_ALLOW_UNSECURE_COMMANDS: 'true'

      - name: Run Detox Build
        run: npm run e2e:build
        env:
          KEYSTORE_FILE: ${{ steps.android_keystore.outputs.filePath }}
          STORE_PASSWORD: ${{ secrets.RELEASE_STORE_PASSWORD }}
          KEY_ALIAS: ${{ secrets.RELEASE_STORE_ALIAS}}
          KEY_PASSWORD: ${{ secrets.RELEASE_KEY_PASSWORD }}
          ANDROID_JSON_KEY_FILE: ${{ steps.service_account_json_file.outputs.filePath }}

      - name: Cache avd snapshot
        uses: actions/cache@v3
        id: avd-cache
        with:
          path: |
            ~/.android/avd/*
            ~/.android/adb*
          key: avd-30-aosp-atd

      - name: Create avd and generate snapshot for caching
        if: steps.avd-cache.outputs.cache-hit != 'true'
        uses: reactivecircus/android-emulator-runner@v2
        with:
          target: aosp_atd
          api-level: 30
          arch: x86
          channel: canary
          profile: pixel
          avd-name: Pixel_3a_API_30
          force-avd-creation: false
          emulator-options: -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none
          disable-animations: false
          script: echo "Generated AVD snapshot for caching"

      - name: Start emulator and run e2e tests
        uses: reactivecircus/android-emulator-runner@v2
        with:
          target: aosp_atd
          api-level: 30
          arch: x86
          channel: canary
          profile: pixel
          avd-name: Pixel_3a_API_30
          script: npm run e2e:test

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.