mirror of
https://github.com/standardnotes/mobile.git
synced 2026-01-04 05:48:05 -05:00
69 lines
2.3 KiB
YAML
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
|