forked from federicoiosue/Omni-Notes
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
67 lines (59 loc) · 2.19 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
sudo: true
language: android
dist: trusty
jdk: openjdk8
env:
global:
- ANDROID_API_LEVEL=29
- ANDROID_EMULATOR_API_LEVEL=26
- ANDROID_BUILD_TOOLS_VERSION=29.0.2
- ANDROID_ABI=default/x86
- API=27
- ABI=x86_64
- EMU_FLAVOR=default # use google_apis flavor if no default flavor emulator
addons:
sonarcloud:
organization: federicoiosue-github
token: $SONAR_TOKEN
branches:
- develop
branches:
only:
- develop
- master
- /^feature/.*$/
- /^hotfix/.*$/
- /^release/.*$/
android:
components:
- tools
- platform-tools
- build-tools-$ANDROID_BUILD_TOOLS_VERSION
- android-$ANDROID_API_LEVEL
- android-$ANDROID_EMULATOR_API_LEVEL
- extra-google-m2repository
- extra-android-m2repository
- sys-img-x86-android-$ANDROID_EMULATOR_API_LEVEL
licenses:
- android-sdk-preview-license-.+
- android-sdk-license-.+
- google-gdk-license-.+
-
install:
- echo 'count=0' > ~/.android/repositories.cfg # Avoid harmless sdkmanager warning
- echo y | sdkmanager "platform-tools" >/dev/null
- echo y | sdkmanager "tools" >/dev/null # A second time per Travis docs, gets latest versions
- echo y | sdkmanager "build-tools;28.0.3" >/dev/null # Implicit gradle dependency - gradle drives changes
- echo y | sdkmanager "platforms;android-$API" >/dev/null # We need the API of the emulator we will run
- echo y | sdkmanager "platforms;android-28" >/dev/null # We need the API of the current compileSdkVersion from gradle.properties
- echo y | sdkmanager --channel=4 "emulator" # Experiment with canary, specifying 28.0.3 (prior version) did not work
- echo y | sdkmanager "extras;android;m2repository" >/dev/null
- echo y | sdkmanager "system-images;android-$API;$EMU_FLAVOR;$ABI" #>/dev/null # install our emulator
- echo no | avdmanager create avd --force -n test -k "system-images;android-$API;$EMU_FLAVOR;$ABI" -c 10M
- emulator -verbose -avd test -no-accel -no-snapshot -no-window $AUDIO -camera-back none -camera-front none -selinux permissive -qemu -m 2048 &
- android-wait-for-emulator
- adb shell input keyevent 82 &
script:
- ./gradlew -S clean build testAll jacocoTestReport sonarqube
after_success:
- bash <(curl -s https://codecov.io/bash)