-
Notifications
You must be signed in to change notification settings - Fork 23
/
Copy path.travis.yml
70 lines (60 loc) · 1.96 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
language: android
jdk: oraclejdk8
sudo: false
env:
global:
- ANDROID_API_LEVEL=25
- ANDROID_BUILD_TOOLS_VERSION=25.0.0
- ANDROID_ABI=armeabi-v7a
- ADB_INSTALL_TIMEOUT=20
- ANDROID_EMULATOR_API_LEVEL=21
android:
components:
- platform-tools
- tools
- build-tools-$ANDROID_BUILD_TOOLS_VERSION
- android-$ANDROID_API_LEVEL
- addon-google_apis-google-$ANDROID_EMULATOR_API_LEVEL
- extra-google-google_play_services
- extra-google-m2repository
- extra-android-m2repository
- sys-img-armeabi-v7a-google_apis-$ANDROID_EMULATOR_API_LEVEL
branches:
only:
- master
- dev
- /^(\d+\.)?(\d+\.)?(\*|\d+)(?:-[\da-z\-]+(?:\.[\da-z\-]+)*)?(?:\+[\da-z\-]+(?:\.[\da-z\-]+)*)?$/
before_script:
- echo no | android create avd --force -n test -t android-$ANDROID_EMULATOR_API_LEVEL --abi $ANDROID_ABI
- emulator -avd test -no-audio -no-window &
cache:
directories:
- $HOME/.m2
- $HOME/.gradle
- ${TRAVIS_BUILD_DIR}/gradle/caches/
- ${TRAVIS_BUILD_DIR}/gradle/wrapper/dists/
before_install:
- export TZ=Asia/Kuala_Lumpur
script:
- ./gradlew clean :api-client:test :api-client:jacocoTestReport jacocoTestMockDebugUnitTestCoverage -PdisablePreDex --continue --no-daemon
- ./gradlew checkstyle :api-client:checkstyleMain -PdisablePreDex --continue --no-daemon
- android-wait-for-emulator
- adb shell input keyevent 82
- ./gradlew createMockDebugCoverageReport -PdisablePreDex --continue
after_success:
- bash <(curl -s https://codecov.io/bash)
before_deploy:
- openssl aes-256-cbc -K $encrypted_91c31e58792b_key -iv $encrypted_91c31e58792b_iv -in secure.tar.enc -out secure.tar -d
- tar xvf secure.tar
deploy:
- provider: script
script: ./gradlew publishBetaRelease --no-daemon
skip_cleanup: true
on:
branch: dev
- provider: script
script: ./gradlew publishProdRelease -PPLAY_STORE_TRACK=production --no-daemon
skip_cleanup: true
on:
branch: master
tags: true