forked from somecookie/runPHARAA
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
54 lines (48 loc) · 2.15 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
language: android
# These two lines probably don't change anything
dist: trusty # choose the type of operating system (Ubuntu 14)
sudo: required # toggle sudo mode (should be a bit faster)
android:
components:
- tools
- platform-tools
- tools # needed twice because travis is stupid
- build-tools-27.0.3 # your build tools version
- android-28 # your app's target api level
- android-19 # your emulator's api level
- android-21
- extra-google-google_play_services # use google play services
- extra-google-m2repository # needed for play services
- extra-android-m2repository # needed for play services
- addon-google_apis-google-19 # google apis
- sys-img-armeabi-v7a-google_apis-21 # image to be used for emulator, make sure it's a apis-google one
# Uncomment if you are getting install timeouts
env:
global:
- ADB_INSTALL_TIMEOUT=8
notifications:
email: false # disable email notifications
# For some reason Travis can't accept the license for 27 automatically...
before_install:
- yes | sdkmanager "platforms;android-27"
- chmod +x gradlew
before_script:
# Emulator Management: Create, Start and Wait: put the android version you chose for emulator and make sure you put the right abi (google_apis/armeabi-v7a)
- echo no | android create avd --force -n test -t android-21 --abi google_apis/armeabi-v7a
- emulator -avd test -no-window &
- android-wait-for-emulator
- adb shell settings put global window_animation_scale 0 &
- adb shell settings put global transition animation_scale 0 &
- adb shell settings put global animator_duration_scale 0 &
# Set up Code Climate test reporter
- adb shell input keyevent 82 &
- curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
- chmod +x ./cc-test-reporter
- ./cc-test-reporter before-build
script:
- ./gradlew connectedCheck jacocoTestReport -i
after_script:
# Report test coverage to Code Climate
- export JACOCO_SOURCE_PATH=app/src/main/java/
- ./cc-test-reporter format-coverage ./app/build/reports/jacoco/jacocoTestReport/jacocoTestReport.xml --input-type jacoco
- ./cc-test-reporter upload-coverage