2020-04-01 19:38:21 +02:00
|
|
|
image: reactivecircus/android-emulator-23:latest
|
|
|
|
|
|
|
|
variables:
|
|
|
|
API_LEVEL: "23"
|
|
|
|
ARCH: "x86"
|
|
|
|
TARGET: "default"
|
|
|
|
#CC_TEST_REPORTER_ID defined in GitLab CI settings
|
|
|
|
|
|
|
|
stages:
|
|
|
|
- test
|
|
|
|
- report
|
|
|
|
|
|
|
|
test:
|
|
|
|
stage: test
|
|
|
|
script:
|
|
|
|
- echo no | avdmanager create avd --force --name "api-${API_LEVEL}" --abi "${TARGET}/${ARCH}" --package "system-images;android-${API_LEVEL};${TARGET};${ARCH}"
|
|
|
|
- $ANDROID_HOME/emulator/emulator -avd "api-${API_LEVEL}" -no-window -gpu swiftshader_indirect -no-snapshot -noaudio -no-boot-anim -camera-back none &
|
|
|
|
- chmod +x android-wait-for-emulator.sh
|
2020-06-24 15:34:14 +02:00
|
|
|
- ./gradlew build
|
2020-04-01 19:38:21 +02:00
|
|
|
- ./android-wait-for-emulator.sh
|
|
|
|
- adb shell settings put global window_animation_scale 0.0
|
|
|
|
- adb shell settings put global transition_animation_scale 0.0
|
|
|
|
- adb shell settings put global animator_duration_scale 0.0
|
|
|
|
|
2020-08-22 22:34:21 +02:00
|
|
|
- ./gradlew build connectedCheck connectedDebugAndroidTest jacocoTestReport
|
2020-06-24 15:34:14 +02:00
|
|
|
|
|
|
|
- cat app/build/reports/jacoco/jacocoTestReport/html/index.html | grep -o 'Total[^%]*%'
|
2020-04-01 19:38:21 +02:00
|
|
|
|
2020-06-24 15:34:14 +02:00
|
|
|
artifacts:
|
|
|
|
paths:
|
|
|
|
- ./app/build/reports/jacoco/jacocoTestReport/
|
2020-08-22 22:34:21 +02:00
|
|
|
expire_in: 1 week
|