Skip to content

Commit

Permalink
Update e2e_android.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
jtklein committed Jun 17, 2024
1 parent bd6c964 commit 038241a
Showing 1 changed file with 31 additions and 36 deletions.
67 changes: 31 additions & 36 deletions .github/workflows/e2e_android.yml
Original file line number Diff line number Diff line change
Expand Up @@ -116,45 +116,40 @@ jobs:
key: apk

# This is by far the longest step in this job, currently we are building the apk everytime, maybe there should be a more specific trigger for the entire job
# - name: Build for detox
# if: steps.cache-apk.outputs.cache-hit != 'true'
# run: npm run e2e:build:android
- name: Build for detox
if: steps.cache-apk.outputs.cache-hit != 'true'
run: npm run e2e:build:android

# Starts the avd previously set-up by name
- name: Android Emulator
timeout-minutes: 15
continue-on-error: true
run: |
echo "Starting emulator"
nohup $ANDROID_HOME/emulator/emulator -avd Pixel_5_API_34_AOSP -no-audio -no-snapshot -no-window -no-boot-anim -timezone America/Los_Angeles &
$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 devices
$ANDROID_HOME/platform-tools/adb emu geo fix -121.45356 46.51119 4392 12
echo "Emulator started"
- name: Ensure servers are running
run: |
mkdir -p android/app/build/outputs/apk
touch android/app/build/outputs/apk/cache-test.txt
# # Starts the avd previously set-up by name
# - name: Android Emulator
# timeout-minutes: 15
# continue-on-error: true
# run: |
# echo "Starting emulator"
# nohup $ANDROID_HOME/emulator/emulator -avd Pixel_5_API_34_AOSP -no-audio -no-snapshot -no-window -no-boot-anim -timezone America/Los_Angeles &
# $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 devices
# $ANDROID_HOME/platform-tools/adb emu geo fix -121.45356 46.51119 4392 12
# echo "Emulator started"

# - name: Ensure servers are running
# run: |
# # is rails running?
# curl -I --fail "https://staging.inaturalist.org/ping"
# # is node running & is ES working?
# curl -I --fail "https://stagingapi.inaturalist.org/v2/taxa"

# # Start the Android e2e tests with extensive logging and screen captures for failing tests
# - name: Android Detox
# run: npm run e2e:test:android -- --take-screenshots failing --record-videos failing -l debug

# # The artifacts for the failing tests are available for download on github.com on the page of the individual actions run
# - name: Store Detox artifacts on test failure
# uses: actions/upload-artifact@v4
# if: failure()
# with:
# name: detox-artifacts
# path: artifacts
# is rails running?
curl -I --fail "https://staging.inaturalist.org/ping"
# is node running & is ES working?
curl -I --fail "https://stagingapi.inaturalist.org/v2/taxa"
# Start the Android e2e tests with extensive logging and screen captures for failing tests
- name: Android Detox
run: npm run e2e:test:android -- --take-screenshots failing --record-videos failing -l debug

# The artifacts for the failing tests are available for download on github.com on the page of the individual actions run
- name: Store Detox artifacts on test failure
uses: actions/upload-artifact@v4
if: failure()
with:
name: detox-artifacts
path: artifacts

notify:
name: Notify Slack
Expand Down

0 comments on commit 038241a

Please sign in to comment.