-
Notifications
You must be signed in to change notification settings - Fork 1
/
.travis.yml
125 lines (112 loc) · 4.72 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
sudo: required
language: android
jdk: oraclejdk8
if: tag is blank
env:
global:
- ANDROID_API_LEVEL=28
- ANDROID_BUILD_TOOLS_VERSION=28.0.3
- ADB_INSTALL_TIMEOUT=20
- ANDROID_HOME=/usr/local/android-sdk
- TOOLS=${ANDROID_HOME}/tools
- PATH=${ANDROID_HOME}:${ANDROID_HOME}/emulator:${TOOLS}:${TOOLS}/bin:${ANDROID_HOME}/platform-tools:${PATH}
- secure: WdAlW1LoOdCndZP2AnlYAH6PG/IVIj9H4YXxWsIPqoSwwc4WGshEJBV+BWiGOZh6k9GJdJl49GBodXW5XiFfarenurI26m0BuSPzFcgQRmV/fLN242Z2T+HKJGtNVFMZIEs+ePaAgiBV/YWAVkTlXlzbULjXGRjNpagW5Dy35Ye/r2R3B4WLlufQHmHyCIdjmTyBag2FoSvVmhYv2Uea0ERIuHeSHYjIk7tY3d5qshOCkjzUdcI/Dozd+DAX66+EVq5a3I9Xlyet6Fc598xF+iN3Rw2yz8pWOrQkZAmBR+Gi/ZaYWGeKg6tytsuV0LwtuoT0xnzwIJeYT9k+K0GzK1BRHXIk0aDwMYnwjGmMsKIiNZ8T55Yp/Dayi5MyZx3IrJ1UAne8gRxbeZRDOVx3IUmJiAmBewcmtTdVStkBfYukyHaYIorqCjP9VupB1PD7cFHkWyuiRrMtTpFi2cgzf97P4LkoT8ZY19cjoVw5KCGaKrST7u0+XS9bfZhF7C1j5eMaoVpp5OC2/80zMhlmzl3oBgRWmLONS6jVR3kjqzFgAQjdB2JnuTkCawsuSKBzMtTMZCUPy7jaxGpFNU5jUYc/VO80o09fEOwtgoPGPWGh+2QHSMx3lA/U+83oT3/K4Ldsnhq3MjTQtYKoCLiwhZT9Jb8Qp5vvLGJtX3Dlyo8=
matrix:
include:
- name: "API 22 UT/IT(small) :app"
env:
- EMULATOR_API_LEVEL=22
- ANDROID_ABI=x86_64
- ANDROID_ABI_TAG=default
- TEST_SUITE=small
- name: "API 22 IT(medium) :app"
env:
- EMULATOR_API_LEVEL=22
- ANDROID_ABI=x86_64
- ANDROID_ABI_TAG=default
- TEST_SUITE=medium
- name: "API 22 IT(large) :app"
env:
- EMULATOR_API_LEVEL=22
- ANDROID_ABI=x86_64
- ANDROID_ABI_TAG=default
- TEST_SUITE=large
- name: "API 22 UT/IT/E2E :testing/:sample"
env:
- EMULATOR_API_LEVEL=22
- ANDROID_ABI=x86_64
- ANDROID_ABI_TAG=default
- TEST_SUITE=e2e
android:
components:
- tools
licenses:
- android-sdk-preview-license-.+
- android-sdk-license-.+
- google-gdk-license-.+
- '.+'
before_cache:
- rm -f $HOME/.gradle/caches/modules-2/modules-2.lock
- rm -fr $HOME/.gradle/caches/*/plugin-resolution/
cache:
directories:
- "$HOME/.gradle/caches/"
- "$HOME/.gradle/wrapper/"
- "$HOME/google-cloud-sdk/"
before_install:
- touch ~/.android/repositories.cfg
- sdkmanager --list || true
- yes | sdkmanager "platform-tools" > /dev/null
- yes | sdkmanager "tools" > /dev/null
- yes | sdkmanager "build-tools;$ANDROID_BUILD_TOOLS_VERSION" > /dev/null
- yes | sdkmanager "platforms;android-$ANDROID_API_LEVEL" > /dev/null
- yes | sdkmanager "platforms;android-$EMULATOR_API_LEVEL" > /dev/null
- curl -fo emulator.zip "https://dl.google.com/android/repository/emulator-linux-5264690.zip" #29.2.1.0
- rm -rf "${ANDROID_HOME}/emulator"
- unzip -q emulator.zip -d "${ANDROID_HOME}"
- rm -f emulator.zip
- ls -lat ${ANDROID_HOME}/emulator
- ${ANDROID_HOME}/emulator/emulator -version
- yes | sdkmanager "extras;android;m2repository" > /dev/null
- yes | sdkmanager "system-images;android-$EMULATOR_API_LEVEL;$ANDROID_ABI_TAG;$ANDROID_ABI"
- bundle install
#install:
#- chmod +x ci/run_unit_tests.sh
#- bash ci/run_unit_tests.sh
before_script:
- echo no | avdmanager -v create avd -f -n test -k "system-images;android-$EMULATOR_API_LEVEL;$ANDROID_ABI_TAG;$ANDROID_ABI" -c 10M
- emulator -verbose -avd test -no-audio -no-window -no-accel -no-snapshot -camera-back none -camera-front none -skin 768x1280 -selinux permissive -qemu -m 2048 &
- android-wait-for-emulator
- adb shell input keyevent 82 &
- adb shell input tap 650 400 &
#- adb logcat -v time -s "ProfiledTestWatcher" &
- adb logcat -v time *:V > logcat.log &
script:
- bundle exec fastlane all_tests_${TEST_SUITE}
after_success:
- bash <(curl -s https://codecov.io/bash)
after_failure:
- grep "RetryStatementDecorator\|ScreenshotOnTestFailedRule\|UploadScreenCaptureProcessor\|ProfiledTestWatcher" logcat.log
#- grep "TestRunner\|ScreenshotOnTestFailedRule\|UploadScreenCaptureProcessor\|Choreographer\|ViewInteraction\|LifecycleMonitor" logcat.log
#before_deploy:
#- chmod +x ci/run_firebase_tests.sh
#- gcloud version || true
#- if [ ! -d "$HOME/google-cloud-sdk/bin" ]; then rm -rf $HOME/google-cloud-sdk; export $CLOUDSDK_CORE_DISABLE_PROMPTS; curl https://sdk.cloud.google.com | bash; fi
#- source /home/travis/google-cloud-sdk/path.bash.inc
#- gcloud version
#- gcloud components update
#- echo $GCLOUD_SERVICE_KEY | base64 --decode -i > $HOME/gcloud-service-key.json
#- gcloud config set project $GOOGLE_PROJECT_ID
#- gcloud auth activate-service-account --key-file=$HOME/gcloud-service-key.json --project=$GOOGLE_PROJECT_ID
#- bundle exec fastlane deploy_tests
deploy:
provider: script
on:
branch: master
condition: $TEST_SUITE = small
script: >-
echo $GOOGLE_PLAY_KEY | base64 --decode -i > gplay_key.json &&
bundle exec fastlane supply init &&
chmod +x ci/download_ci_data.sh &&
bash ci/download_ci_data.sh $DROPBOX_KEY $SIGNING_ARCHIVE_NAME &&
bundle exec fastlane deploy_internal