-
Notifications
You must be signed in to change notification settings - Fork 2
/
.travis.yml
44 lines (39 loc) · 1.68 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
dist: trusty
android:
components:
- tools
- platform-tools
- tools
# The BuildTools version used by your project
- build-tools-28.0.0
- build-tools-27.0.3
# The SDK version used to compile your project
- android-28
# Target version
- android-24
# Image for emulator
- sys-img-armeabi-v7a-android-24
# Update docker-compose Emulator Management: Create, Start and Wait
before_script:
- sudo rm /usr/local/bin/docker-compose
- curl -L https://github.com/docker/compose/releases/download/1.22.0/docker-compose-`uname -s`-`uname -m` > docker-compose
- chmod +x docker-compose
- sudo mv docker-compose /usr/local/bin
script:
- sh -c "ps aux --sort -rss | head -20"
- export TEST_POOL_IP=$(ip -o addr show | grep -E "eth0.*inet " | grep -E -o -e "[0-9]*(\.[0-9]*){3}" | head -1)
- android list targets
- docker pull ubuntu:16.04 # Prepulling the image to ensure that network issues happen early on in the build
- ci/create-emulator.sh
- ci/travis.sh # Rest of the commands are prefixed with travis_wait, because they might take long. This is a builtin and doesn't work in the script itself
- travis_wait docker-compose up -d
- sh -c "ps aux --sort -rss | head -20"
- travis_wait 60 android-wait-for-emulator
- sh -c "ps aux --sort -rss | head -20"
- ci/wait-for-dockers.sh
- sh -c "ps aux --sort -rss | head -20"
- adb shell input keyevent 82 & # 82 is the special code for unlocking the screen
- adb root
- adb shell input touchscreen swipe 100 420 101 420 # Presses the "Close app" button on the dialog "Process system is not responding", freeing up the device
- travis_wait ./gradlew connectedCheck --stacktrace