Files
mobile/.github/workflows/e2e.yml
Radek Czemerys 24abfc8d72 chore: bump dependencies
disable e2e test for now
2020-09-16 16:40:39 +02:00

69 lines
2.3 KiB
YAML

name: e2e
on: [workflow_dispatch]
jobs:
android:
runs-on: macos-latest
timeout-minutes: 30
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 1
- name: Download Android Emulator Image
run: |
$ANDROID_HOME/tools/bin/sdkmanager --install "system-images;android-28;default;x86_64"
$ANDROID_HOME/tools/bin/avdmanager create avd -n pixel -d "Nexus 5X" --package "system-images;android-28;default;x86_64"
- name: Install Dependencies
run: yarn install
- name: Add usesCleartextTraffic to release AndroidManifest.xml
run: yarn replace-in-file '<application' '<application android:usesCleartextTraffic="true"' ./android/app/src/main/AndroidManifest.xml
- name: Build for detox
env:
DETOX_CI: true
run: yarn detox build --configuration android.emu.release
- name: Setup Emulator
timeout-minutes: 10
run: |
echo "Starting emulator"
nohup $ANDROID_HOME/emulator/emulator -avd pixel -no-audio -no-snapshot -no-window -gpu swiftshader_indirect &
$ANDROID_HOME/platform-tools/adb wait-for-device shell 'while [[ -z $(getprop sys.boot_completed | tr -d '\r') ]]; do sleep 1; done; input keyevent 82'
$ANDROID_HOME/platform-tools/adb shell settings put global window_animation_scale 0 &
$ANDROID_HOME/platform-tools/adb shell settings put global transition_animation_scale 0 &
$ANDROID_HOME/platform-tools/adb shell settings put global animator_duration_scale 0 &
echo "Emulator started"
- name: Run tests
run: yarn detox test --configuration android.emu.release
ios:
runs-on: macos-latest
timeout-minutes: 30
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 1
- name: Install Dependencies
run: yarn install
- name: Install Pods
run: npx pod-install ios
- name: Install detox dependencies
run: brew tap wix/brew
- name: Install simulator utils
run: brew install applesimutils
- name: Build for detox
run: yarn detox build --configuration ios.sim.release
- name: Run tests
run: yarn detox test --configuration ios.sim.release