-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy path.travis.yml
43 lines (39 loc) · 1.74 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
language: go
go:
- tip
env:
global:
- ANDROID_SDK_VERSION="r24.3.3"
- DEBUG_LOG=VV
- ANDROID_TARGET=android-21
- ANDROID_ABI=armeabi-v7a
before_install:
- go get github.com/modocache/gover
- go get github.com/mattn/goveralls
- go get golang.org/x/tools/cmd/cover
- sudo apt-get update -qq
- if [ `uname -m` = x86_64 ]; then sudo apt-get update; fi
- if [ `uname -m` = x86_64 ]; then sudo apt-get install -qq --force-yes libgd2-xpm ia32-libs ia32-libs-multiarch; fi
- wget http://dl.google.com/android/android-sdk_${ANDROID_SDK_VERSION}-linux.tgz
- tar -zxf android-sdk_${ANDROID_SDK_VERSION}-linux.tgz
- export ANDROID_HOME=`pwd`/android-sdk-linux
- export PATH=${PATH}:${ANDROID_HOME}/tools:${ANDROID_HOME}/platform-tools
- echo "sdk.dir=$ANDROID_HOME" > local.properties
- echo yes | android update sdk --filter $ANDROID_TARGET,sys-img-$ANDROID_ABI-$ANDROID_TARGET,tools,platform-tools --no-ui --force --all
- echo no | android create avd --force -n emu1 -t $ANDROID_TARGET --abi $ANDROID_ABI
- emulator -avd emu1 -no-skin -no-audio -no-window &
before_script:
- adb devices
- sleep 60
- adb devices
script:
- go test -coverprofile=goandroid.coverprofile
- go test -coverprofile=activity.coverprofile ./activity
- go test -coverprofile=adbutility.coverprofile ./adbutility
- go test -coverprofile=device.coverprofile ./device
- go test -coverprofile=display.coverprofile ./display
- go test -coverprofile=geometry.coverprofile ./geometry
- go test -coverprofile=input.coverprofile ./input
- go test -coverprofile=view.coverprofile ./view
- $HOME/gopath/bin/gover
- $HOME/gopath/bin/goveralls -coverprofile=gover.coverprofile -service=travis-ci