-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.travis.yml
More file actions
68 lines (57 loc) · 1.61 KB
/
.travis.yml
File metadata and controls
68 lines (57 loc) · 1.61 KB
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
language: android
jdk: oraclejdk8
android:
components:
- tools
- build-tools-28.0.3
- android-27
- extra-android-m2repository
before_install:
- yes | sdkmanager "platforms;android-27"
- chmod +x gradlew
- export AUTHOR_NAME="$(git log -1 $TRAVIS_COMMIT --pretty="%aN")"
jobs:
include:
# Build and test in one script for faster builds
- stage: Build And Test
language: android
before_script: set -o pipefail
script: ./gradlew assemble testDebugUnitTest 2>&1 | tee travisOutput.txt
#=============================================
# Build of app without any other task
- stage: Build
language: android
script: ./gradlew assemble
# After Build, run all our tests first to ensure we wrote passing tests
- stage: Test
language: android
name: "Release One Tests"
script: ./gradlew testDebugUnitTest -Prelease="one"
- script: ./gradlew testDebugUnitTest -Prelease="two"
name: "Release Two Tests"
- script: ./gradlew testDebugUnitTest -Prelease="three"
name: "Release Three Tests"
- script: ./gradlew test
name: "All Tests"
# Static Analysis and Code Coverage
- stage: Analyze
language: android
name: "Static Analysis"
script: ./gradlew lint
- script: ./gradlew jacocoTestReport
name: "Test Coverage"
stages:
# Non-master builds (need speed)
- name: Build And Test
if: branch != master
# For master builds
- name: Build
if: branch = master
- name: Test
if: branch = master
- name: Analyze
if: branch = master
# If there was a failure, show a summary of what happened
after_failure:
- chmod 755 summarize-log.sh
- ./summarize-log.sh