mirror of
https://gitlab.shinice.net/pixeldroid/PixelDroid
synced 2024-12-22 13:06:34 +01:00
59 lines
1.7 KiB
YAML
59 lines
1.7 KiB
YAML
image: reactivecircus/android-emulator-26:latest
|
|
|
|
|
|
variables:
|
|
API_LEVEL: "26"
|
|
ARCH: "x86"
|
|
TARGET: "default"
|
|
|
|
|
|
# Basic android and gradle stuff
|
|
# Check linting
|
|
lintDebug:
|
|
interruptible: true
|
|
stage: build
|
|
script:
|
|
- ./gradlew checkLicenses
|
|
- ./gradlew -Pci --console=plain :app:lintDebug -PbuildDir=lint
|
|
|
|
# Make Project
|
|
assembleDebug:
|
|
interruptible: true
|
|
stage: build
|
|
script:
|
|
- ./gradlew assembleDebug
|
|
artifacts:
|
|
paths:
|
|
- app/build/outputs/
|
|
|
|
# Run all tests, if any fails, interrupt the pipeline(fail it)
|
|
debugTests:
|
|
interruptible: true
|
|
stage: test
|
|
script:
|
|
- ./gradlew -Pci --console=plain :app:testDebug
|
|
|
|
|
|
#emulatorTest:
|
|
# interruptible: true
|
|
# stage: test
|
|
# script:
|
|
# - sdkmanager --sdk_root=${ANDROID_HOME} "system-images;android-${API_LEVEL};${TARGET};${ARCH}"
|
|
# - 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
|
|
# - ./gradlew build
|
|
# - ./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
|
|
|
|
# - ./gradlew build connectedCheck connectedDebugAndroidTest jacocoTestReport
|
|
|
|
# - cat app/build/reports/jacoco/jacocoTestReport/html/index.html | grep -o 'Total[^%]*%'
|
|
|
|
# artifacts:
|
|
# paths:
|
|
# - ./app/build/reports/jacoco/jacocoTestReport/
|
|
# expire_in: 1 week
|