.cirrus.yml
check_android_task:
name: Run Android tests
env:
API_LEVEL: 30
TARGET: google_apis
ARCH: x86
CC_TEST_REPORTER_ID: ENCRYPTED[!e910f63dbf85cb27b5d537114f7e81c10361e47ec43ac3fb7b91c09a6646e945482bb6100213468bd93874ff712b6774!]
FIREBASE_API_KEY : ENCRYPTED[4913176803fdd1377247495ebb56739ec42a73f426f69d18ce2ab2b6fdfd88ca8a9e52c3e34ebc47063a1e4a068485c2]
GOOGLE_SERVICES_KEY : ENCRYPTED[61ced0f74fd39fef7ea75ae812377fa6e1e856bc4348e6896b5280100395e0c4266b17298eeeb9f3406f9922178ef92e]
KEYS_FILE: ENCRYPTED[f94ea688c17b805e020ea5edcba81a2fed0ea95aa5b31a7133f84f9746c5146a831ea83063f3d4f8603388c91e479510]
container:
image: reactivecircus/android-emulator-$API_LEVEL:latest
kvm: true
cpu: 8
memory: 10G
create_device_script:
echo no | avdmanager create avd --force --name test --abi "$TARGET/$ARCH" --package "system-images;android-$API_LEVEL;$TARGET;$ARCH"
start_emulator_background_script:
$ANDROID_SDK_ROOT/emulator/emulator -avd test -no-window -gpu swiftshader_indirect -no-snapshot -no-audio -no-boot-anim -camera-back emulated
set_auth_tokens_script: |
echo $GOOGLE_SERVICES_KEY > app/google-services.json
set_keys_script: |
echo $KEYS_FILE > app/src/main/res/values/keys.xml
build_script: |
chmod +x gradlew
./gradlew assembleDebugAndroidTest
wait_for_emulator_script: |
adb wait-for-device
adb shell input keyevent 82
disable_animations_script: |
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
prepare_codeclimate_script: |
curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
chmod +x ./cc-test-reporter
./cc-test-reporter before-build
check_script:
./gradlew check connectedCheck
report_codeclimate_script: |
export JACOCO_SOURCE_PATH=app/src/main/java/
./cc-test-reporter format-coverage ./app/build/reports/jacoco/jacocoTestReport/jacocoTestReport.xml --input-type jacoco
./cc-test-reporter upload-coverage
lint_script:
./gradlew lintDebug
always:
android-lint_artifacts:
path: ./app/build/reports/lint-results-debug.xml
type: text/xml
format: android-lint