-
Notifications
You must be signed in to change notification settings - Fork 40
/
.travis.yml
70 lines (65 loc) · 2.71 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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
sudo: required
language: android
jdk: oraclejdk8
image: thyrlian/android-sdk
android:
components:
- tools
- platform-tools
# - build-tools-29.0.0
# - build-tools-28.0.2
- build-tools-25.0.2
- android-25
# - android-28
- extra-google-google_play_services
- extra-google-m2repository
- extra-android-support
- extra-android-m2repository
# - addon-google_apis-google-28
# - sys-img-armeabi-v7a-android-28
- add-on
- extra
before_install:
- sudo apt-get update
- sudo apt-get install -y make build-essential libssl-dev zlib1g-dev libbz2-dev libreadline-dev
libsqlite3-dev wget curl llvm libncurses5-dev libncursesw5-dev xz-utils tk-dev
- git clone https://github.com/pyenv/pyenv.git ~/.pyenv
- echo 'export PYENV_ROOT="$HOME/.pyenv"' >> ~/.bash_profile
- echo 'export PATH="$PYENV_ROOT/bin:$PATH"' >> ~/.bash_profile
- echo 'eval "$(pyenv init -)"' >> ~/.bash_profile
- git clone https://github.com/yyuu/pyenv-virtualenv.git ~/.pyenv/plugins/pyenv-virtualenv
- echo 'eval "$(pyenv virtualenv-init -)"' >> ~/.bash_profile
- source ~/.bash_profile
- pyenv versions
- pyenv install 3.6.1
- pyenv virtualenv 3.6.1 undang
- pyenv activate undang
- pip install -r requirements.txt
- curl -sL https://deb.nodesource.com/setup_9.x | sudo -E bash -
- sudo apt-get install nodejs
- sudo apt-get install build-essential
- PATH=$PATH:$JAVA_HOME/bin
- npm install appium
- npm install appium-doctor
- "./node_modules/.bin/appium-doctor"
- "./node_modules/.bin/appium --log-level info > appium_log.txt &"
- sdkmanager tools
# - echo yes | sdkmanager "build-tools;25.0.2"
# - echo yes | sdkmanager "platforms;android-25"
before_script:
- echo y | sdkmanager "system-images;android-25;google_apis;armeabi-v7a"
- echo "no" | avdmanager --verbose create avd -n PF -k "system-images;android-25;google_apis;armeabi-v7a" -b google_apis/armeabi-v7a -f
# -k "system-images;android-25;google_apis;armeabi-v7a" --abi "google_apis;armeabi-v7a" --tag google_apis --device "pixel" --name PF --force
# - echo no | android create avd --force -n PF -t android-28 --abi armeabi-v7a
- $ANDROID_HOME/emulator/emulator -avd PF -no-skin -no-audio -no-window &
- android-wait-for-emulator
- adb shell input keyevent 82 &
script:
- avd devices
- "./gradlew assemble" # Build
# - ./gradlew clean connectedCheck
# - chmod +x ./gradlew
# - ./gradlew connectedAndroidTest mergeAndroidReports --continue -PdisablePreDex --stacktrace
- python3 -m pytest src/spec/* # Test
after_script:
- cat ./appium_log.txt # Check appium log