Skip to content

Commit 95f3074

Browse files
committed
run tests on travis
1 parent 3532a2f commit 95f3074

File tree

7 files changed

+53
-9
lines changed

7 files changed

+53
-9
lines changed

.travis.yml

+32-6
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,42 @@
11
language: android
22

3+
# Use the Travis Container-Based Infrastructure
4+
sudo: false
5+
6+
jdk:
7+
- oraclejdk8
8+
9+
env:
10+
global:
11+
- ANDROID_BUILD_TOOLS_VERSION=25.0.2
12+
- ADB_INSTALL_TIMEOUT=20 # install timeout in minutes (2 minutes by default)
13+
matrix:
14+
- ANDROID_TARGET=android-22 ANDROID_ABI=armeabi-v7a
15+
316
android:
417
components:
5-
# Update Android SDK Tools
6-
- tools
7-
8-
- build-tools-23.0.3
9-
- android-24
18+
- tools # to get the new `repository-11.xml`
19+
- tools # to install new Android SDK tools
20+
- platform-tools
21+
- build-tools-$ANDROID_BUILD_TOOLS_VERSION
22+
- $ANDROID_TARGET
23+
- android-25
1024

1125
# Support library
1226
- extra-android-support
1327
- extra-android-m2repository
1428

29+
# System images
30+
- sys-img-${ANDROID_ABI}-${ANDROID_TARGET}
31+
32+
before_script:
33+
- chmod +x ./gradlew
34+
# Emulator Management: Create, Start and Wait
35+
- echo no | android create avd --force -n test -t $ANDROID_TARGET --abi $ANDROID_ABI
36+
- emulator -avd test -no-audio -no-window &
37+
- android-wait-for-emulator
38+
1539
script:
16-
- chmod +x ./gradlew
40+
- ./gradlew assemble
41+
- ./gradlew build check # Local unit tests
42+
- ./gradlew build connectedCheck # Instrumented unit tests

app/build.gradle

+4
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,10 @@ android {
3232
applicationIdSuffix ".noop"
3333
}
3434
}
35+
36+
lintOptions {
37+
abortOnError false
38+
}
3539
}
3640

3741
dependencies {

build.gradle

+2-3
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ buildscript {
33
gitTag = 'git describe --tags'.execute([], project.rootDir).text.trim()
44
gitCommitCount = Integer.parseInt('git rev-list --count HEAD'.execute([], project.rootDir).text.trim())
55

6-
buildToolsVersion = '25.0.1'
6+
buildToolsVersion = '25.0.2'
77

88
compileSdkVersion = 25
99
targetSdkVersion = 25
@@ -14,9 +14,8 @@ buildscript {
1414
realmVersion = '2.3.1'
1515

1616
// dependencies
17-
supportLibVersion = '25.1.1'
1817
timberVersion = '4.3.0'
19-
supportLibVersion = '25.1.1'
18+
supportLibVersion = '25.2.0'
2019
}
2120

2221
repositories {

gradle.properties

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
org.gradle.jvmargs=-Xmx2048M

gradlew

100644100755
File mode changed.

realm-browser-no-op/build.gradle

+4
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@ android {
1212
versionCode project.gitCommitCount
1313
versionName project.gitTag
1414
}
15+
16+
lintOptions {
17+
abortOnError false
18+
}
1519
}
1620

1721
dependencies {

realm-browser/build.gradle

+10
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,16 @@ android {
1313
versionName project.gitTag
1414
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
1515
}
16+
17+
lintOptions {
18+
abortOnError false
19+
}
20+
21+
// This enables long timeouts required on slow environments, e.g. Travis
22+
adbOptions {
23+
timeOutInMs 10 * 60 * 1000 // 10 minutes
24+
installOptions "-d","-t"
25+
}
1626
}
1727

1828
dependencies {

0 commit comments

Comments
 (0)