-
Notifications
You must be signed in to change notification settings - Fork 4
/
.travis.yml
150 lines (142 loc) · 5.06 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
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
language: android
android:
components:
# Uncomment the lines below if you want to
# use the latest revision of Android SDK Tools
# - tools
# - platform-tools
# The BuildTools version used by your project
# - build-tools-26.0.2
# The SDK version used to compile your project
# - android-26
- android-22
# Additional components
# - extra-google-google_play_services
# - extra-google-m2repository
# - extra-android-m2repository
# Specify at least one system image,
# if you need to run emulator(s) during your tests
# - sys-img-x86-android-25
- sys-img-armeabi-v7a-android-22
# - sys-img-x86-google_apis-26
licenses:
- 'android-sdk-license-.+'
- '.+'
# Emulator Management: Create, Start and Wait
before_script:
- echo no | android create avd --force -n test -t android-22 --abi armeabi-v7a
# - echo no | android create avd --force -n test -t android-226 --abi x86-google_apis
- emulator -avd test -no-audio -no-window &
- android-wait-for-emulator
- adb shell input keyevent 82 &
script:
# - ./gradlew core:test # Local unit test
- ./gradlew sdk:connectedAndroidTest # Instrumented unit test
## Setting java 1.8
#language: android
#jdk:
# - oraclejdk8
#
#sudo: required # disables container-based builds which have a maximum of 4GB of memory
#
## caching as advised by travis
#before_cache:
# - rm -f $HOME/.gradle/caches/modules-2/modules-2.lock
# - rm -rf $HOME/.gradle/caches/*/plugin-resolution/
#
#cache:
# directories:
# - $HOME/.gradle/caches/
# - $HOME/.gradle/wrapper/
# - $HOME/.android/build-cache
#
#env:
# matrix:
# - EMULATOR_API_LEVEL=23 ANDROID_EMULATOR_IMAGE=sys-img-armeabi-v7a-android-23
# - EMULATOR_API_LEVEL=22 ANDROID_EMULATOR_IMAGE=sys-img-armeabi-v7a-android-22
# - EMULATOR_API_LEVEL=21 ANDROID_EMULATOR_IMAGE=sys-img-armeabi-v7a-android-21
# - EMULATOR_API_LEVEL=19 ANDROID_EMULATOR_IMAGE=sys-img-armeabi-v7a-android-19
#
# global:
# - ANDROID_API_LEVEL=27
# - ANDROID_BUILD_TOOLS_VERSION=27.0.3
# - ADB_INSTALL_TIMEOUT=20 # wait up to 20 minutes for adb to connect to emulator (2 minutes by default)
# - ANDROID_ABI=armeabi-v7a
#
#android:
# components:
# # Base components
# - tools # to get the new `repository-11.xml`
# - tools # https://github.com/travis-ci/travis-ci/issues/6040#issuecomment-219367943)
# - platform-tools
# - build-tools-$ANDROID_BUILD_TOOLS_VERSION # get the build tools version to build the project
#
# # used sdk versions
# - android-$ANDROID_API_LEVEL # get the android sdk version to build the project
# - android-$EMULATOR_API_LEVEL # get the android sdk version for the emulator
#
# # Get the latest version of additional components
# - extra-android-support
# - extra-google-m2repository
# - extra-android-m2repository
# - extra-google-google_play_services
#
# # Specify the needed emulator
# - $ANDROID_EMULATOR_IMAGE
#
#licenses:
# - 'android-sdk-license-.+'
# - '.+'
#
## Emulator Management: Create, Start and Wait
#before_install:
# - echo $ANDROID_TARGET
# - echo $ANDROID_ABI
# - adb logcat > logcat.log &
#
#install:
# - sdkmanager --list || true # List all available targets, device definitions and AVDs.
# # Update sdk tools to latest version and install/update components
# - echo yes | sdkmanager "tools"
# - echo yes | sdkmanager "platform-tools"
# - echo yes | sdkmanager "build-tools;"$ANDROID_BUILD_TOOLS_VERSION
# - echo yes | sdkmanager "platforms;android-"$ANDROID_API_LEVEL # Latest platform required by SDK tools
#
# - echo yes | sdkmanager "extras;android;m2repository"
# - echo yes | sdkmanager "extras;google;m2repository"
# - echo yes | sdkmanager "extras;m2repository;com;android;support;constraint;constraint-layout;1.0.2"
# - echo yes | sdkmanager "extras;m2repository;com;android;support;constraint;constraint-layout-solver;1.0.2"
#
# - echo yes | sdkmanager --update
# - echo yes | sdkmanager --licenses
#
# # Check components status
# - sdkmanager --list || true
#
#before_script:
# # Create and start the emulator
# - sdkmanager "system-images;android-"$EMULATOR_API_LEVEL";google_apis;armeabi-v7a"
# - echo no | avdmanager -v create avd -f -n test -k "system-images;android-"$EMULATOR_API_LEVEL";google_apis;armeabi-v7a"
# - $ANDROID_HOME/emulator/emulator -avd test -no-audio -no-window &
#
# - android-wait-for-emulator
#
# # Turn off animations
# - adb shell settings put global window_animation_scale 0 &
# - adb shell settings put global transition_animation_scale 0 &
# - adb shell settings put global animator_duration_scale 0 &
#
# # Wake up
# - adb shell input keyevent 82 &
# - adb shell input keyevent 1 &
#script:
## - ./gradlew core:test # Local unit test
# - ./gradlew sdk:connectedAndroidTest # Instrumented unit test
## - ./gradlew sdk:lint #maybe at some point
## - ./gradlew clean test build
#after_script:
# - echo $ANDROID_TARGET
# - echo $ANDROID_ABI
# - cat /home/travis/build/Countly/countly-sdk-android/sdk-messaging/build/outputs/lint-results-debug.xml
# - cat /home/travis/build/Countly/countly-sdk-android/sdk/build/reports/androidTests/connected/index.html
#