-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.travis.yml
59 lines (50 loc) · 1.86 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
# https://docs.travis-ci.com/user/languages/android/
# https://medium.com/@zurfyx/android-travis-ci-with-autodeploy-api-26-efb6c1863628
# https://developer.android.com/studio/test/command-line.html#RunTestsDevice
# https://developer.android.com/training/testing/unit-testing/instrumented-unit-tests.html
language: android
jdk: openjdk11
sudo: required
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
android:
components:
- tools
- tools
- platform-tools
- android-30
- build-tools-30.0.3
- extra
# - sys-img-armeabi-v7a-android-22
## uncomment android emulator if android integration tests are needed
#before_script:
# - echo no | android create avd --force -n test -t android-22 --abi armeabi-v7a
# - emulator -avd test -no-audio -no-window &
# - android-wait-for-emulator
# - adb shell input keyevent 82 &
script:
- jdk_switcher use oraclejdk8 # use java 8 which is the last that is supported by android
- yes | sdkmanager "platforms;android-30" # accept licenses
- yes | sdkmanager "build-tools;30.0.3" # accept licenses
- chmod +x gradlew # make executable
- ./gradlew test jacocoTestReport
## uncomment test exec if android integration tests are needed
# - ./gradlew connectedAndroidTest
- ./gradlew lint
- export JAVA_HOME=$HOME/openjdk11 # use java 11 which is needed for sonar
- sonar-scanner
addons:
sonarcloud:
organization: "alexx882-github" # der key der organisation auf sonarcloud.io
token: $SONAR_TOKEN # Umgebungsvariable auf travis-ci.com
# benachrichtigungen per email ausschalten
notifications:
email:
on_success: never # default: change
on_failure: never # default: always