-
Notifications
You must be signed in to change notification settings - Fork 12
/
.travis.yml
87 lines (75 loc) · 2.83 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
language: android
# sudo set to required because of an issue with how TravisCI handles builds in Docker containers https://github.com/travis-ci/travis-ci/issues/3695.
# Setting sudo to required prevents Travis from testing the project in a Docker container.
sudo: required
jdk: oraclejdk8
dist: trusty
before_cache:
- rm -f $HOME/.gradle/caches/modules-2/modules-2.lock
- rm -fr $HOME/.gradle/caches/*/plugin-resolution/
cache:
directories:
# Android SDK
- $HOME/android-sdk-dl
- $HOME/android-sdk
# Gradle cache
- $HOME/.gradle/caches/
- $HOME/.gradle/wrapper/
# Android build cache (see http://tools.android.com/tech-docs/build-cache)
- $HOME/.android/build-cache
env:
matrix:
- ANDROID_TARGET=android-22 ANDROID_ABI=armeabi-v7a
global:
# wait up to 10 minutes for adb to connect to emulator
- ADB_INSTALL_TIMEOUT=10
- MALLOC_ARENA_MAX=2
android:
components:
# tools required
- tools
# The BuildTools version used by your project
- build-tools-28.0.3
# The SDK version used to compile your projects
- android-28
- android-22
# Additional components here
- extra-google-google_play_services
- extra-google-m2repository
- extra-android-m2repository
- addon-google_apis-google-19
# Specify at least one system image,
# if you need to run emulator(s) during your tests
- sys-img-armeabi-v7a-android-22
addons:
apt_packages:
- pandoc
before_script:
# Emulator Management: Create, Start and Wait
- echo no | android create avd --force -n test -t $ANDROID_TARGET --abi $ANDROID_ABI
- emulator -avd test -no-skin -no-audio -no-window &
- adb wait-for-device
- adb shell input keyevent 82 &
script:
- echo "Travis branch is $TRAVIS_BRANCH"
- echo "Travis branch is in pull request $TRAVIS_PULL+REQUEST"
- chmod 755 gradlew
- ls -lah
- ls -lah $HOME/.gradle/wrapper/
# This is supposed to run the normal project build
# jacocoTestReport is supposed to run both local and instrumented tests on all the modules
# Gradle issue running composite tasks in order https://github.com/gradle/gradle/issues/3300
# Cache and make gradle run paralle
- echo "org.gradle.caching=true
org.gradle.parallel=true" >> gradle.properties
- travis_wait ./gradlew clean --stacktrace
- travis_wait ./gradlew build -x test --stacktrace
- travis_wait ./gradlew jacocoTestReport --stacktrace
- travis_wait ./gradlew jacocoFullReport --stacktrace
- ./gradlew coveralls --stacktrace
after_failure:
#- pandoc opensrp-app/build/reports/tests/index.html -t plain
# Add this once a slack notification channel for Kujaku project app is created
#notifications:
# slack:
# secure: fAiZ4yA7DM6nUKh7nqsCTqZBb03VEAvi5NcRu5mNh5coNn/50XNeZl+qpv7Dw70Ef85Y/k68uc6KwTGVqPXEmVq9Hk3e7lqpBNN8rufvgCYDDGPmywBmU5BhSeykKo0Ee7llM3mRR/EipjIWw1+YvMcS3hCoygf/UlMDDhG0Jo0=