-
Notifications
You must be signed in to change notification settings - Fork 5
/
.travis.yml
92 lines (92 loc) · 2.97 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
language: android
env:
global:
- ADB_INSTALL_TIMEOUT=8
- QEMU_AUDIO_DRV=none
stages:
- build
- name: emulatorTests
if: branch = master
- quality
jobs:
include:
- stage: build
install: true
script:
- "./gradlew clean"
- "./gradlew build"
before_script:
- mkdir -p $ANDROID_HOME/licenses
- echo "8933bad161af4178b1185d1a37fbf41ea5269c55" > $ANDROID_HOME/licenses/android-sdk-license
- echo "d56f5187479451eabf01fb78af6dfcb131a6481e" >> $ANDROID_HOME/licenses/android-sdk-license
before_cache:
- rm -f $HOME/.gradle/caches/modules-2/modules-2.lock
- rm -fr $HOME/.gradle/caches/*/plugin-resolution/
- rm -fr .gradle/
cache:
directories:
- "$HOME/.gradle/caches/"
- "$HOME/.gradle/wrapper/"
- "$HOME/.android/build-cache"
- ".gradle"
- app/build/jacoco
- stage: emulatorTests
android:
components:
- tools
- platform-tools
- tools
- build-tools-24.0.1
- android-24
- extra-android-support
- extra-google-m2repository
- extra-android-m2repository
- addon-google_apis-google-24
- sys-img-armeabi-v7a-android-24
- sys-img-armeabi-v7a-google_apis-google-23
- sys-img-x86_64-google_apis-google-23
licenses:
- android-sdk-preview-license-.+
- android-sdk-license-.+
- google-gdk-license-.+
install: true
before_script:
- mkdir -p $ANDROID_HOME/licenses
- echo "8933bad161af4178b1185d1a37fbf41ea5269c55" > $ANDROID_HOME/licenses/android-sdk-license
- echo "d56f5187479451eabf01fb78af6dfcb131a6481e" >> $ANDROID_HOME/licenses/android-sdk-license
- echo no | android create avd --force --name test -t android-24 --abi armeabi-v7a
- emulator -avd test -no-skin -no-audio -no-window -engine classic &
- android-wait-for-emulator
- adb shell input keyevent 82 &
script:
- "./gradlew connectedFullDebugAndroidTest"
cache:
directories:
- "$HOME/.gradle/caches/"
- "$HOME/.gradle/wrapper/"
- "$HOME/.android/build-cache"
- ".gradle"
- app/build/jacoco
- app/build/reports
- app/build/outputs/code-coverage
- stage: quality
install: true
before_script:
- mkdir -p $ANDROID_HOME/licenses
- echo "8933bad161af4178b1185d1a37fbf41ea5269c55" > $ANDROID_HOME/licenses/android-sdk-license
- echo "d56f5187479451eabf01fb78af6dfcb131a6481e" >> $ANDROID_HOME/licenses/android-sdk-license
script:
- "./gradlew jacocoTestReport"
- "./gradlew sonarqube -Dsonar.organization=$SONAR_ORGANISATION -Dsonar.host.url=https://sonarcloud.io
-Dsonar.login=$SONAR_TOKEN"
cache:
directories:
- ".gradle"
- app/build/jacoco
- app/build/reports
- app/build/outputs/code-coverage
after_success:
- bash <(curl -s https://codecov.io/bash)
before_install:
- openssl aes-256-cbc -K $encrypted_8a68725abf25_key -iv $encrypted_8a68725abf25_iv
-in AssociationAurav3.jks.enc -out AssociationAurav3.jks -d