forked from EvanRespaut/Equate
-
Notifications
You must be signed in to change notification settings - Fork 0
/
circle.yml
111 lines (102 loc) · 4.72 KB
/
circle.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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
#
# Build configuration for Circle CI
# Using Ubuntu 12.04 (Precise) Build Environment
#
general:
artifacts:
- /home/ubuntu/Equate/app/build/outputs/apk/
machine:
java:
# jdk8 needed for fb-adb
version: oraclejdk8
environment:
ANDROID_HOME: /usr/local/android-sdk-linux
TERM: "dumb"
#not sure what this does, remove if uncessary later
JAVA_OPTS: "-Xms512m -Xmx2048m"
ADB_INSTALL_TIMEOUT: 5000
dependencies:
cache_directories:
- ~/.android
- /usr/local/android-sdk-linux/platforms/android-25
pre:
- fb-adb start-server:
background: true
override:
- echo y | android update sdk --no-ui --all --filter "tools,platform-tools"
- echo y | android update sdk --no-ui --all --filter "build-tools-25.0.1"
- echo y | android update sdk --no-ui --all --filter "android-25"
- echo y | android update sdk --no-ui --all --filter "extra-google-m2repository"
- echo y | android update sdk --no-ui --all --filter "extra-android-m2repository"
#- echo y | android update sdk --no-ui --all --filter "extra-android-support"
- chmod +x gradlew
- ANDROID_HOME=/usr/local/android-sdk-linux ./gradlew dependencies
#dependencies:
# pre:
# - chmod +x gradlew
# # Android SDK Platform 25
# - if [ ! -d "/usr/local/android-sdk-linux/platforms/android-25" ]; then echo y | android update sdk --no-ui --all --filter "android-25"; fi
# # Android SDK Build-tools, revision 25.0.0
# - if [ ! -d "/usr/local/android-sdk-linux/build-tools/25.0.5" ]; then echo y | android update sdk --no-ui --all --filter "build-tools-25.0.5"; fi
# # Android Support Repository, revision 39 / Local Maven repository for Support Libraries
# - if [ ! -d "/usr/local/android-sdk-linux/extras/android/m2repository/com/android/support/design/25.0.0" ]; then echo y | android update sdk --no-ui --all --filter "extra-android-m2repository"; fi
#
#
# cache_directories:
# - /usr/local/android-sdk-linux/platforms/android-25
# - /usr/local/android-sdk-linux/build-tools/25.0.0
# - /usr/local/android-sdk-linux/extras/android/m2repository
test:
override:
# start the emulator
- emulator -avd circleci-android22 -no-audio -no-window:
background: true
parallel: true
# wait for it to have booted
- circle-android wait-for-boot
# unlock the emulator screen
- sleep 50
- adb shell input keyevent 82
- fb-adb rcmd screencap -p > $CIRCLE_ARTIFACTS/$(date +"%T")screen-after-unlock.png
# directly open settings
- fb-adb shell am start -n com.android.settings/.Settings
- sleep 10
- fb-adb rcmd screencap -p > $CIRCLE_ARTIFACTS/$(date +"%T")screen-settings-open.png
# click search
- fb-adb shell input tap 440 80
- sleep 10
- fb-adb rcmd screencap -p > $CIRCLE_ARTIFACTS/$(date +"%T")screen-post-click-search.png
# type hold
- fb-adb shell input text 'hold'
- sleep 20
- fb-adb rcmd screencap -p > $CIRCLE_ARTIFACTS/$(date +"%T")screen-post-type-hold.png
# click search
- fb-adb shell input tap 440 750
- sleep 10
- fb-adb rcmd screencap -p > $CIRCLE_ARTIFACTS/$(date +"%T")screen-post-click-search.png
# click hold
- fb-adb shell input tap 300 240
- sleep 10
- fb-adb rcmd screencap -p > $CIRCLE_ARTIFACTS/$(date +"%T")screen-post-click-result.png
# click setting
- fb-adb shell input tap 250 415
- sleep 10
- fb-adb rcmd screencap -p > $CIRCLE_ARTIFACTS/$(date +"%T")screen-post-click-option-hold.png
# click long
- fb-adb shell input tap 130 480
- sleep 10
- fb-adb rcmd screencap -p > $CIRCLE_ARTIFACTS/$(date +"%T")screen-post-click-long.png
# run tests against the emulator.9
- ./gradlew connectedAndroidTest -PdisablePreDex
# run the JUnit tests located in app\src\test\java\com\llamacorp
- ./gradlew test
# copy the test results to the test results directory.
- cp -r app/build/test-results/* $CIRCLE_TEST_REPORTS
# copy the Android test results to the test results directory.
- cp -r app/build/outputs/androidTest-results/* $CIRCLE_TEST_REPORTS
# copy the Android test results to the test results directory.
- cp -r app/build/reports $CIRCLE_ARTIFACTS
# copy a little file to make finding test reports easier
- wget -O $CIRCLE_ARTIFACTS/Report_Summary.html 'https://www.dropbox.com/s/xjfu281rkmv2oow/Reports.html?dl=0'
# # Save a screenshot to Circle-CI Artifacts
- fb-adb rcmd screencap -p > $CIRCLE_ARTIFACTS/screen-post-testing-$(date +"%T").png