Skip to content

Commit 75cc6bf

Browse files
committed
Rewritten from scratch TravisCI config to add tests
1 parent 3c4531d commit 75cc6bf

File tree

1 file changed

+29
-8
lines changed

1 file changed

+29
-8
lines changed

.travis.yml

Lines changed: 29 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,37 +2,58 @@ sudo: true
22
language: android
33
dist: trusty
44
install: true
5+
jdk: openjdk8
6+
7+
env:
8+
global:
9+
- ANDROID_API_LEVEL=28
10+
- ANDROID_EMULATOR_API_LEVEL=22
11+
- ANDROID_BUILD_TOOLS_VERSION=28.0.3
12+
- ANDROID_ABI=armeabi-v7a
13+
514
addons:
615
sonarcloud:
716
organization: federicoiosue-github
817
token: $SONAR_TOKEN
918
branches:
1019
- develop
11-
jdk:
12-
- oraclejdk8
20+
1321
branches:
1422
only:
1523
- develop
1624
- master
1725
- /^feature/.*$/
1826
- /^hotfix/.*$/
1927
- /^release/.*$/
28+
2029
android:
2130
components:
2231
- tools
23-
- tools
2432
- platform-tools
25-
- build-tools-27.0.3
26-
- android-23
33+
- build-tools-$ANDROID_BUILD_TOOLS_VERSION
34+
- android-$ANDROID_API_LEVEL
35+
- android-$ANDROID_EMULATOR_API_LEVEL
2736
- extra-google-m2repository
2837
- extra-android-m2repository
38+
- sys-img-armeabi-v7a-android-$ANDROID_EMULATOR_API_LEVEL
39+
2940
licenses:
3041
- android-sdk-preview-license-.+
3142
- android-sdk-license-.+
3243
- google-gdk-license-.+
44+
3345
before_install:
34-
- yes | sdkmanager "platforms;android-27"
35-
script:
36-
- ./gradlew -S clean build jacocoTestReport sonarqube
46+
- yes | sdkmanager "platforms;android-$ANDROID_API_LEVEL"
47+
- yes | sdkmanager "platforms;android-$ANDROID_EMULATOR_API_LEVEL"
48+
49+
before_script:
50+
- echo no | android create avd --force -n test -t android-$ANDROID_EMULATOR_API_LEVEL --abi $ANDROID_ABI
51+
- emulator -avd test -no-skin -no-audio -no-window &
52+
- android-wait-for-emulator
53+
- adb shell input keyevent 82 &
54+
55+
script:
56+
- ./gradlew -S clean build test connectedAndroidTest jacocoTestReport sonarqube
57+
3758
after_success:
3859
- bash <(curl -s https://codecov.io/bash)

0 commit comments

Comments
 (0)