forked from didryo/Smart-Receipts
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
71 lines (60 loc) · 2.38 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
dist: trusty
language: android
jdk: oraclejdk8
sudo: required # See https://github.com/travis-ci/travis-ci/issues/5582
before_cache:
# Do not cache a few Gradle files/directories (see https://docs.travis-ci.com/user/languages/java/#Caching)
- rm -f $HOME/.gradle/caches/modules-2/modules-2.lock
- rm -fr $HOME/.gradle/caches/*/plugin-resolution/
cache:
directories:
# Gradle dependencies
- $HOME/.gradle/caches/
- $HOME/.gradle/wrapper/
# Android build cache (see http://tools.android.com/tech-docs/build-cache)
- $HOME/.android/build-cache
android:
components:
- tools
- tools
- platform-tools
- build-tools-28.0.3
- android-26
# Additional components
- addon-google_apis-google-27
- extra-google-google_play_services
- extra-android-support
- extra-google-m2repository
- extra-android-m2repository
licenses:
- 'android-sdk-preview-license-52d11cd2'
- 'android-sdk-license-.+'
- 'google-gdk-license-.+'
notifications:
email:
recipients:
on_success: change # default: change
on_failure: always # default: always
before_install:
#- sudo add-apt-repository -y ppa:cpick/hub # adding ubuntu repo for downloading hub
- sudo apt-get -y update # get latest versions of dependencies before installing hub
- HUB_DIST=linux-amd64 HUB_VERSION=`curl -w "%{url_effective}\n" -I -L -s -S github.com/github/hub/releases/latest -o /dev/null | awk -F'releases/tag/v' '{ print $2 }'`; curl "https://github.com/github/hub/releases/download/v$HUB_VERSION/hub-$HUB_DIST-$HUB_VERSION.tgz" -L | tar xvz && sudo ./hub-$HUB_DIST-$HUB_VERSION/install && rm -r ./hub-$HUB_DIST-$HUB_VERSION # install hub
#- sudo apt-get -y install hub # install hub
- gem install twine # install hub
- mkdir "$ANDROID_HOME/licenses" || true
- echo -e "\n8933bad161af4178b1185d1a37fbf41ea5269c55" > "$ANDROID_HOME/licenses/android-sdk-license"
- echo -e "\n84831b9409646a918e30573bab4c9c91346d8abd" > "$ANDROID_HOME/licenses/android-sdk-preview-license"
- yes | sdkmanager "platforms;android-28"
- chmod +x gradlew
script:
- "travis_wait 20 sleep 1800 &"
- "./gradlew clean test"
after_failure:
- echo "Build FAILED"
# tests
- cat app/build/reports/tests/testFreeDebugUnitTest/index.html
- cat app/build/reports/tests/testPlusFlavorDebugUnitTest/index.html
# app
- cat app/build/reports/lint-results.xml
- cat app/build/reports/lint-results.html