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 21, 2024
1 parent 3706beb commit fc39f7e
Showing 1 changed file with 12 additions and 13 deletions.
25 changes: 12 additions & 13 deletions .github/workflows/e2e_android.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ concurrency:
jobs:
checksecret:
name: check for oauth client
runs-on: macos-14
runs-on: macos-13
outputs:
is_SECRETS_PRESENT_set: ${{ steps.checksecret_job.outputs.is_SECRETS_PRESENT_set }}
steps:
Expand All @@ -24,7 +24,7 @@ jobs:
test:
needs: checksecret
if: needs.checksecret.outputs.is_SECRETS_PRESENT_set == 'true'
runs-on: macos-14
runs-on: macos-13
# Kill the task if not finished after 60 minutes
timeout-minutes: 90

Expand All @@ -44,7 +44,7 @@ jobs:
with:
node-version: 18

# Currently, macos-14 runner has 3 Java versions pre-installed, default is 17
# Currently, macos-13 runner has 3 Java versions pre-installed, default is 17
- name: Set up JDK 8
uses: actions/setup-java@v4
with:
Expand All @@ -56,8 +56,6 @@ jobs:
# There were errors when setting Java version used to either 11 or 17 explicitly here.
- name: Download Android Emulator Image
run: |
echo "y" | $ANDROID_HOME/tools/bin/sdkmanager --update
echo "y" | $ANDROID_HOME/tools/bin/sdkmanager --install "platform-tools"
echo "y" | $ANDROID_HOME/tools/bin/sdkmanager --install "system-images;android-31;default;arm64-v8a"
echo "no" | $ANDROID_HOME/tools/bin/avdmanager create avd --force --name Pixel_5_API_31_AOSP --device "Nexus 5X" -k 'system-images;android-31;default;x86_64'
AVD_PATH="$HOME/.android/avd/Pixel_5_API_31_AOSP.avd"
Expand Down Expand Up @@ -118,16 +116,17 @@ jobs:
java-version: '17'
distribution: 'zulu'

- name: Cache APK
uses: actions/cache@v4
id: cache-apk
with:
path: android/app/build/outputs/apk
key: apk
# This can be used for testing emulator stuff, run this once and use the cached apk for the rest of the job
# - name: Cache APK
# uses: actions/cache@v4
# id: cache-apk
# with:
# path: android/app/build/outputs/apk
# 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'
# if: steps.cache-apk.outputs.cache-hit != 'true'
run: npm run e2e:build:android

# Starts the avd previously set-up by name
Expand Down Expand Up @@ -165,7 +164,7 @@ jobs:
name: Notify Slack
needs: test
if: ${{ success() || failure() }}
runs-on: macos-14
runs-on: macos-13
steps:
- uses: iRoachie/slack-github-actions@v2.3.0
if: env.SLACK_WEBHOOK_URL != null
Expand Down

0 comments on commit fc39f7e

Please sign in to comment.