Skip to content

Commit 6783245

Browse files
committed
chore(ci): use JDK11
It will be the new required minimum version for next android gradle plugin, and github actions runners on Ubuntu just switched to it by default
1 parent 8a54669 commit 6783245

File tree

1 file changed

+11
-6
lines changed

1 file changed

+11
-6
lines changed

.github/workflows/tests_e2e.yml

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -83,10 +83,15 @@ jobs:
8383
max_attempts: 3
8484
command: DETOX_DISABLE_POSTINSTALL=1 yarn --no-audit --prefer-offline
8585

86-
- name: Verify JDK 1.8
87-
# OpenJDK1.8 is the default in GitHub macOS 10.15 runner, setup is not required
88-
# Run a check that exits with error unless it is 1.8 version to future-proof against unexpected upgrades
89-
run: java -fullversion 2>&1 | grep '1.8'
86+
- name: Configure JDK 1.11
87+
uses: actions/setup-java@v1
88+
with:
89+
java-version: "11" # ubuntu-latest is about to default to 11, force it everywhere
90+
91+
- name: Verify JDK11
92+
# Default JDK varies depending on different runner flavors, make sure we are on 11
93+
# Run a check that exits with error unless it is 11 version to future-proof against unexpected upgrades
94+
run: java -fullversion 2>&1 | grep '11.0'
9095
shell: bash
9196

9297
- name: Build Android App
@@ -117,10 +122,10 @@ jobs:
117122
timeout_minutes: 10
118123
retry_wait_seconds: 60
119124
max_attempts: 3
120-
command: echo "y" | $ANDROID_HOME/tools/bin/sdkmanager --install "system-images;android-30;google_apis;x86_64"
125+
command: echo "y" | $ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager --install "system-images;android-30;google_apis;x86_64"
121126

122127
- name: Create Emulator
123-
run: echo "no" | $ANDROID_HOME/tools/bin/avdmanager create avd --force --name TestingAVD --device "Nexus 5X" -k 'system-images;android-30;google_apis;x86_64' -g google_apis
128+
run: echo "no" | $ANDROID_HOME/cmdline-tools/latest/bin/avdmanager create avd --force --name TestingAVD --device "Nexus 5X" -k 'system-images;android-30;google_apis;x86_64' -g google_apis
124129

125130
# These Emulator start steps are the current best practice to do retries on multi-line commands with persistent (nohup) processes
126131
- name: Start Android Emulator

0 commit comments

Comments
 (0)