Skip to content

test(e2e): making the e2e testing suite more reliable with detox and local backend #16

test(e2e): making the e2e testing suite more reliable with detox and local backend

test(e2e): making the e2e testing suite more reliable with detox and local backend #16

Workflow file for this run

name: E2E
on:
pull_request:
branches: [ main ]
jobs:
android:
name: E2E (Android)
runs-on: macos-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: 20
- uses: actions/setup-java@v2
with:
java-version: '11'
distribution: 'adopt'
env:
# https://github.com/actions/toolkit/issues/641#issuecomment-728963957
ACTIONS_ALLOW_UNSECURE_COMMANDS: 'true'
- uses: actions/cache@v2
with:
path: |
node_modules
ios/Pods
key: ${{ runner.os }}-deps-${{ hashFiles('**/yarn.lock', '**/Podfile.lock') }}
restore-keys: |
${{ runner.os }}-deps-
- run: NOPOSTINSTALLPODS=1 yarn install
- name: Build app
run: yarn e2e:build android.emu.debug
- name: Run Detox Tests (test attempt \#1)
continue-on-error: true
id: test1
uses: reactivecircus/android-emulator-runner@v2
with:
api-level: 29
avd-name: Pixel_API_29_AOSP
force-avd-creation: false
emulator-options: -no-window -gpu swiftshader_indirect -no-snapshot -noaudio -no-boot-anim -camera-back none -camera-front none -partition-size 2047
arch: x86_64
script: bash ${{ github.workspace }}/ci/tasks/e2e-android.sh
- name: Run Detox Tests (test attempt \#2)
continue-on-error: true
id: test2
if: steps.test1.outcome != 'success'
uses: reactivecircus/android-emulator-runner@v2
with:
api-level: 29
avd-name: Pixel_API_29_AOSP
force-avd-creation: false
emulator-options: -no-window -gpu swiftshader_indirect -no-snapshot -noaudio -no-boot-anim -camera-back none -camera-front none -partition-size 2047
arch: x86_64
script: bash ${{ github.workspace }}/ci/tasks/e2e-android.sh
- name: Run Detox Tests (test attempt \#3)
if: steps.test1.outcome != 'success' && steps.test2.outcome != 'success'
uses: reactivecircus/android-emulator-runner@v2
with:
api-level: 29
avd-name: Pixel_API_29_AOSP
force-avd-creation: false
emulator-options: -no-window -gpu swiftshader_indirect -no-snapshot -noaudio -no-boot-anim -camera-back none -camera-front none -partition-size 2047
arch: x86_64
script: bash ${{ github.workspace }}/ci/tasks/e2e-android.sh
# ios:
# name: E2E (iOS)
# runs-on: macOS-latest
# steps:
# - uses: actions/checkout@v2
# - uses: actions/setup-node@v2
# with:
# node-version: 20
# - uses: ruby/setup-ruby@v1
# with:
# bundler-cache: true
# - run: yarn install
# - name: Detox deps for ios
# run: |
# brew tap wix/brew
# brew install applesimutils
# - name: Build app
# run: yarn e2e:build ios.sim.debug
# - name: Run Detox Tests
# run: bash ${{ github.workspace }}/ci/tasks/e2e-ios.sh