mirror of
https://github.com/NiciDieNase/chaosflix
synced 2024-11-29 23:50:24 +00:00
56 lines
1.7 KiB
YAML
56 lines
1.7 KiB
YAML
image: inovex/gitlab-ci-android
|
|
#image: openjdk:8-jdk
|
|
|
|
variables:
|
|
ANDROID_COMPILE_SDK: "25"
|
|
ANDROID_BUILD_TOOLS: "25.0.2"
|
|
ANDROID_SDK_TOOLS: "3859397"
|
|
GRADLE_OPTS: "-Dorg.gradle.daemon=false"
|
|
|
|
|
|
before_script:
|
|
- export GRADLE_USER_HOME=$(pwd)/.gradle
|
|
- chmod +x ./gradlew
|
|
- echo "ad8ad258047a00e2ee528be5b1a8a18bab7c4367" > $ANDROID_HOME/licenses/android-sdk-license
|
|
- echo "8933bad161af4178b1185d1a37fbf41ea5269c55" >> $ANDROID_HOME/licenses/android-sdk-license
|
|
- echo "d56f5187479451eabf01fb78af6dfcb131a6481e" >> $ANDROID_HOME/licenses/android-sdk-license
|
|
- cat $ANDROID_HOME/licenses/*
|
|
|
|
stages:
|
|
- build
|
|
- test
|
|
|
|
cache:
|
|
key: ${CI_PROJECT_ID}
|
|
paths:
|
|
- .gradle/
|
|
|
|
build:
|
|
stage: build
|
|
script:
|
|
- ./gradlew --info --stacktrace assembleDebug
|
|
artifacts:
|
|
paths:
|
|
- app/build/outputs/apk/*.apk
|
|
|
|
unitTests:
|
|
stage: test
|
|
script:
|
|
- ./gradlew --stacktrace test
|
|
artifacts:
|
|
paths:
|
|
- app/build/reports/tests/
|
|
|
|
functionalTests:
|
|
stage: test
|
|
script:
|
|
- env
|
|
- curl -s https://raw.githubusercontent.com/travis-ci/travis-cookbooks/0f497eb71291b52a703143c5cd63a217c8766dc9/community-cookbooks/android-sdk/files/default/android-wait-for-emulator > android-wait-for-emulator
|
|
- chmod +x android-wait-for-emulator
|
|
- echo y | $ANDROID_HOME/tools/bin/sdkmanager "system-images;android-$ANDROID_COMPILE_SDK;google_apis;x86"
|
|
- echo no | $ANDROID_HOME/tools/bin/avdmanager create avd -n test -k "system-images;android-$ANDROID_COMPILE_SDK;google_apis;x86" --abi google_apis/x86
|
|
- $ANDROID_HOME/tools/emulator -force-32bit -avd test -no-window -no-audio &
|
|
- ./android-wait-for-emulator
|
|
- adb shell input keyevent 82
|
|
- ./gradlew --debug --stacktrace cAT
|
|
|