-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcircle.yml
More file actions
50 lines (42 loc) · 2.18 KB
/
circle.yml
File metadata and controls
50 lines (42 loc) · 2.18 KB
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
test:
pre:
# start android emulator
- case $CIRCLE_NODE_INDEX in 1) emulator -avd circleci-android22 -no-window -no-audio -no-boot-anim ;; esac:
parallel: true
background: true
override:
# (1) run plugin tests
# (2) prebuild sample conntected android tests
- case $CIRCLE_NODE_INDEX in 0) ./gradlew mvp-plugin:test ;; 1) ./gradlew :mvp-plugin-sample:assembleDebug :mvp-plugin-sample:assembleDebugAndroidTest ;; esac:
parallel: true
# wait until emulator is ready
- case $CIRCLE_NODE_INDEX in 1) adb wait-for-device shell 'while [[ -z $(getprop sys.boot_completed) ]]; do sleep 1; done; input keyevent 82' ;; esac:
parallel: true
# (1) run plugin checks
# (1) run plugin api checks
# (1) run sample unit tests
# (1) run sample checks
# (2) run sample conntected android tests
- case $CIRCLE_NODE_INDEX in 0) ./gradlew check ;; 1) ./gradlew connectedDebugAndroidTest ;; esac:
parallel: true
post:
# copy test results to report directory
- mkdir $CIRCLE_TEST_REPORTS/plugin-tests && cp -r mvp-plugin/build/test-results/test/*.xml $CIRCLE_TEST_REPORTS/plugin-tests
- mkdir $CIRCLE_TEST_REPORTS/sample-unit-tests && cp -r mvp-plugin-sample/build/test-results/testDebugUnitTest/*.xml $CIRCLE_TEST_REPORTS/sample-unit-tests
- case $CIRCLE_NODE_INDEX in 1) mkdir $CIRCLE_TEST_REPORTS/sample-connected-tests && cp -r mvp-plugin-sample/build/outputs/androidTest-results/connected/* $CIRCLE_TEST_REPORTS/sample-connected-tests ;; esac:
parallel: true
deployment:
report-master:
branch: master
commands:
# report code coverage to codacy for master branch
- ./gradlew sendCoverageToCodacy
release:
tag: /v[0-9\.]*/
owner: nenick
commands:
# push release artifacts to github
- ./gradlew :mvp-plugin:githubRelease -PgithubUser=$GITHUB_USERNAME -PgithubKey=$GITHUB_WRITE_PUBLIC_REPOS_TOKEN
# push release artifacts to bintray
- ./gradlew :mvp-plugin:bintrayUpload -PbintrayUser=$BINTRAY_USERNAME -PbintrayKey=$BINTRAY_KEY -PdryRun=false
- ./gradlew :mvp-plugin-api:bintrayUpload -PbintrayUser=$BINTRAY_USERNAME -PbintrayKey=$BINTRAY_KEY -PdryRun=false