-
Notifications
You must be signed in to change notification settings - Fork 841
/
circle.yml
81 lines (63 loc) · 3.92 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
machine:
java:
version: oraclejdk8
environment:
ANDROID_HOME: /usr/local/android-sdk-linux
ANDROID_BUILD_TOOLS: 26.0.0
QEMU_AUDIO_DRV: none
dependencies:
pre:
# Remove any leftover lock from previous builds
- rm -f $HOME/.gradle/caches/modules-2/modules-2.lock
# Make sure we have the sdkmanager available, and update the Android SDK tools if not
- if [ ! -e $ANDROID_HOME/tools/bin/sdkmanager ]; then echo y | android update sdk --no-ui --all --filter tools; fi
# Install all the required SDK components
- echo y | $ANDROID_HOME/tools/bin/sdkmanager --verbose "platform-tools" "build-tools;"$ANDROID_BUILD_TOOLS "extras;google;m2repository"
override:
# Force Gradle to pre-download dependencies for the app module (the default would only be for the root, which is useless)
- if [ -f ./gradlew ]; then ./gradlew mvi:dependencies --console=plain;else gradle mvi:dependencies --console=plain;fi
cache_directories:
# Android SDK
- /usr/local/android-sdk-linux/tools
- /usr/local/android-sdk-linux/platform-tools
- /usr/local/android-sdk-linux/build-tools
- /usr/local/android-sdk-linux/licenses
- /usr/local/android-sdk-linux/extras/google/m2repository
# Gradle caches
- /home/ubuntu/.gradle/caches/
- /home/ubuntu/.gradle/wrapper/
test:
override:
# start the emulator
- emulator -avd circleci-android24:
background: true
parallel: false
# wait for it to have booted
- circle-android wait-for-boot
# run tests against the emulator.
- ./gradlew test connectedAndroidTest --console=plain
post:
# Collect the JUnit reports
- mkdir -p $CIRCLE_TEST_REPORTS/reports/junit
- find mvi/build/ -name "*.xml" -exec cp {} $CIRCLE_TEST_REPORTS/reports/junit/ \;
- find mvi/build/ -name "*.html" -exec cp {} $CIRCLE_TEST_REPORTS/reports/junit/ \;
- find mvi-common/build/ -name "*.xml" -exec cp {} $CIRCLE_TEST_REPORTS/reports/junit/ \;
- find mvi-common/build/ -name "*.html" -exec cp {} $CIRCLE_TEST_REPORTS/reports/junit/ \;
- find mvi-integration-test/build/ -name "*.xml" -exec cp {} $CIRCLE_TEST_REPORTS/reports/junit/ \;
- find mvi-integration-test/build/ -name "*.html" -exec cp {} $CIRCLE_TEST_REPORTS/reports/junit/ \;
- find mvp-common/build/ -name "*.xml" -exec cp {} $CIRCLE_TEST_REPORTS/reports/junit/ \;
- find mvp-common/build/ -name "*.html" -exec cp {} $CIRCLE_TEST_REPORTS/reports/junit/ \;
- find mvp-lce/build/ -name "*.xml" -exec cp {} $CIRCLE_TEST_REPORTS/reports/junit/ \;
- find mvp-lce/build/ -name "*.xml" -exec cp {} $CIRCLE_TEST_REPORTS/reports/junit/ \;
- find mvp-nullobject-presenter/build/ -name "*.xml" -exec cp {} $CIRCLE_TEST_REPORTS/reports/junit/ \;
- find mvp-nullobject-presenter/build/ -name "*.html" -exec cp {} $CIRCLE_TEST_REPORTS/reports/junit/ \;
- find presentermanager/build/ -name "*.xml" -exec cp {} $CIRCLE_TEST_REPORTS/reports/junit/ \;
- find presentermanager/build/ -name "*.html" -exec cp {} $CIRCLE_TEST_REPORTS/reports/junit/ \;
- find utils-fragment/build/ -name "*.xml" -exec cp {} $CIRCLE_TEST_REPORTS/reports/junit/ \;
- find utils-fragment/build/ -name "*.html" -exec cp {} $CIRCLE_TEST_REPORTS/reports/junit/ \;
- find utils-fragment-integration-test/build/ -name "*.xml" -exec cp {} $CIRCLE_TEST_REPORTS/reports/junit/ \;
- find utils-fragment-integration-test/build/ -name "*.html" -exec cp {} $CIRCLE_TEST_REPORTS/reports/junit/ \;
- find viewstate/build/ -name "*.xml" -exec cp {} $CIRCLE_TEST_REPORTS/reports/junit/ \;
- find viewstate/build/ -name "*.html" -exec cp {} $CIRCLE_TEST_REPORTS/reports/junit/ \;
- find mvp/build/ -name "*.xml" -exec cp {} $CIRCLE_TEST_REPORTS/reports/junit/ \;
- find mvp/build/ -name "*.html" -exec cp {} $CIRCLE_TEST_REPORTS/reports/junit/ \;