This repository has been archived by the owner on Apr 14, 2021. It is now read-only.
forked from cucumber/cucumber-android
-
Notifications
You must be signed in to change notification settings - Fork 1
/
.travis.yml
45 lines (44 loc) · 1.53 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
language: android
jdk: oraclejdk8
#Android builds are only supported on our Trusty image at this time
#hence you’ll need to explicitly specify dist trusty in your .travis.yml file.
dist: trusty
os:
- linux
env:
global:
- ABI=x86_64
- API=21
- ANDROID_BUILD_TOOLS_VERSION=29.0.3
- ADB_INSTALL_TIMEOUT=8 # minutes (2 minutes by default)
android:
components:
- build-tools-$ANDROID_BUILD_TOOLS_VERSION
- android-$API
before_cache:
- rm -f $HOME/.gradle/caches/modules-2/modules-2.lock
- rm -fr $HOME/.gradle/caches/*/plugin-resolution/
cache:
directories:
- "$HOME/.gradle/caches/"
- "$HOME/.gradle/wrapper/"
- "$HOME/.android/build-cache"
before_install:
- yes | sdkmanager tools
- yes | sdkmanager "platform-tools"
- echo y | sdkmanager --channel=3 "emulator"
- yes | sdkmanager "build-tools;$ANDROID_BUILD_TOOLS_VERSION"
- yes | sdkmanager "system-images;android-$API;default;$ABI"
- echo no | avdmanager create avd --force -n test -k "system-images;android-$API;default;$ABI"
-c 100M
- "$ANDROID_HOME/emulator/emulator -avd test -skin 1920x1080 -no-audio -no-window -no-accel -no-snapshot -qemu -m 2048 &"
install:
- "./gradlew clean test"
before_script:
- android-wait-for-emulator # depends on boot animation so do not add -no-boot-anim to the emulator
- adb shell input keyevent 82 &
- adb logcat *:e &
- adb shell settings put secure long_press_timeout 1500
script:
- "./gradlew runInstrumentationTests"
- "./gradlew connectedDebugAndroidTest -Pandroid.testInstrumentationRunnerArguments.cucumberUseAndroidJUnitRunner=true"