mirror of
https://github.com/standardnotes/mobile.git
synced 2026-04-22 23:26:56 -04:00
feature: e2e tests on Github Actions (#254)
This commit is contained in:
73
.github/workflows/e2e.yml
vendored
Normal file
73
.github/workflows/e2e.yml
vendored
Normal file
@@ -0,0 +1,73 @@
|
||||
name: e2e
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
- dev
|
||||
pull_request:
|
||||
|
||||
|
||||
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
|
||||
5
.github/workflows/lint.yml
vendored
5
.github/workflows/lint.yml
vendored
@@ -1,7 +1,6 @@
|
||||
name: Lint & test
|
||||
name: lint & typescript check
|
||||
|
||||
on:
|
||||
push:
|
||||
on: [push]
|
||||
|
||||
jobs:
|
||||
lint:
|
||||
|
||||
Reference in New Issue
Block a user