@@ -3,19 +3,21 @@ on: [push]
33env :
44 API_MIN : 21
55 API_CURRENT : 33
6+ JAVA_DISTRIBUTION : ' corretto'
7+ JAVA_VERSION : ' 17'
68jobs :
79 unit-test-api-level-min :
810 name : unit-test-api-level-$API_MIN
911 runs-on : macos-latest
1012 steps :
1113 - name : Checkout
1214 uses : actions/checkout@v3
13- # repo's gradle is configured to run on java 11
14- - name : Setup java 11 for gradle
15+ # repo's gradle is configured to run on java 17
16+ - name : Setup java 17 for gradle
1517 uses : actions/setup-java@v3
1618 with :
17- distribution : ' temurin '
18- java-version : ' 11 '
19+ distribution : ${{ env.JAVA_DISTRIBUTION }}
20+ java-version : ${{ env.JAVA_VERSION }}
1921 - name : Run unit tests
2022 run : |
2123 ./gradlew :Branch-SDK:testDebugUnitTest
@@ -45,12 +47,12 @@ jobs:
4547 nohup $ANDROID_HOME/tools/emulator -avd test -no-audio -no-boot-anim -camera-back none -camera-front none -qemu -m 2048 2>&1 &
4648 $ANDROID_HOME/platform-tools/adb wait-for-device shell 'while [[ -z $(getprop sys.boot_completed) ]]; do echo "waiting..."; sleep 1; done; input keyevent 82'
4749 echo "Emulator has finished booting"
48- # repo's gradle is configured to run on java 11
49- - name : Setup java 11 for gradle
50+ # repo's gradle is configured to run on java 17
51+ - name : Setup java 17 for gradle
5052 uses : actions/setup-java@v3
5153 with :
52- distribution : ' temurin '
53- java-version : ' 11 '
54+ distribution : ${{ env.JAVA_DISTRIBUTION }}
55+ java-version : ${{ env.JAVA_VERSION }}
5456 # gradlew will automatically connect to booted emulator
5557 - name : Run instrumented tests
5658 run : |
@@ -68,12 +70,12 @@ jobs:
6870 steps :
6971 - name : Checkout
7072 uses : actions/checkout@v3
71- # repo's gradle is configured to run on java 11
72- - name : Setup java 11 for gradle
73+ # repo's gradle is configured to run on java 17
74+ - name : Setup java 17 for gradle
7375 uses : actions/setup-java@v3
7476 with :
75- distribution : ' temurin '
76- java-version : ' 11 '
77+ distribution : ${{ env.JAVA_DISTRIBUTION }}
78+ java-version : ${{ env.JAVA_VERSION }}
7779 - name : Run unit tests
7880 run : |
7981 ./gradlew :Branch-SDK:testDebugUnitTest
@@ -103,12 +105,12 @@ jobs:
103105 nohup $ANDROID_HOME/tools/emulator -avd test -no-audio -no-boot-anim -camera-back none -camera-front none -qemu -m 2048 2>&1 &
104106 $ANDROID_HOME/platform-tools/adb wait-for-device shell 'while [[ -z $(getprop sys.boot_completed) ]]; do echo "waiting..."; sleep 1; done; input keyevent 82'
105107 echo "Emulator has finished booting"
106- # repo's gradle is configured to run on java 11
107- - name : Setup java 11 for gradle
108+ # repo's gradle is configured to run on java 17
109+ - name : Setup java 17 for gradle
108110 uses : actions/setup-java@v3
109111 with :
110- distribution : ' temurin '
111- java-version : ' 11 '
112+ distribution : ${{ env.JAVA_DISTRIBUTION }}
113+ java-version : ${{ env.JAVA_VERSION }}
112114 # gradlew will automatically connect to booted emulator
113115 - name : Run instrumented tests
114116 run : |
0 commit comments