Skip to content

Commit de90bb2

Browse files
committed
Run the tests in travis
Use the gradle wrapper instead of gradle for both the build and the test run. Start an emulator (Api19) and run the tests inside it.
1 parent d9ce987 commit de90bb2

File tree

1 file changed

+16
-3
lines changed

1 file changed

+16
-3
lines changed

.travis.yml

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,19 @@ android:
1414
- tools
1515

1616
- build-tools-22.0.1
17-
- android-22
17+
- android-19
1818

1919
- extra-android-support
2020
- extra-android-m2repository
2121

22-
- sys-img-x86_64-android-22
22+
- sys-img-armeabi-v7a-android-19
23+
24+
before_cache:
25+
- rm -f $HOME/.gradle/caches/modules-2/modules-2.lock
26+
cache:
27+
directories:
28+
- $HOME/.gradle/caches/
29+
- $HOME/.gradle/wrapper/
2330
before_install:
2431
- sed -i 's/[email protected]:/https:\/\/github.com\//' .gitmodules
2532
- git submodule update --init --recursive
@@ -29,6 +36,12 @@ before_install:
2936
- export ANDROID_NDK_HOME=`pwd`/android-ndk-$NDK_VERSION
3037
- export PATH=${PATH}:${ANDROID_NDK_HOME}
3138

39+
before_script:
40+
- echo no | android create avd --force -n Arm19 -t android-19 -b armeabi-v7a -c 12M
41+
- emulator -avd Arm19 -no-skin -no-audio -no-window &
42+
- android-wait-for-emulator
43+
3244
script:
33-
- gradle packar -PPACKAGE_VERSION=5.5.5
45+
- ./gradlew packar -i -PPACKAGE_VERSION=5.5.5 -PcompileSdk=android-19 -PsupportVersion=19.0.0 --stacktrace
46+
- ./gradlew runtest -PenableTest -PcompileSdk=android-19 -PsupportVersion=19.0.0 -PtargetSdk=19 --stacktrace
3447

0 commit comments

Comments
 (0)