forked from vgaidarji/ci-matters
-
Notifications
You must be signed in to change notification settings - Fork 0
/
shippable.yml
45 lines (44 loc) · 2.49 KB
/
shippable.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
language: java
jdk:
- oraclejdk7
env:
global:
# FABRIC_API_KEY FABRIC_API_SECRET COVERALLS_REPO_TOKEN
- secure: fIgFHVipIx882h50ZWKSXMvvRSRlTkmyoD5eVrm9ld1lFspwZ1t01x4V5HOYyl28sAlkAaD5Sc1dfV8RGj9nQtmbFjypGP/DS7HjqekHGIcl/BACSZc3XNCE2Btbn2jQuQ0a4Tjqn/xqjCJumNMOmo3JVNfpedURPAvYfuicD5tDkFJDv2yt0m10VhSFQoC3WC9XQC3WzGzwfcUcOmcYWz+gZW40EUIlzUiqvlWe5f3EuOnYWEh6CPoIBuQj8dhTmkPFX77XjVXjv7DVToQYJPA94LA1dVE26gxrwDaYPoLsLycYtXlVDYBwz6Ih8z1EkhYL1fFDfrz0aXCkxhohbw==
- JACOCO_REPORT_LOCATION="app/build/reports/jacocoTestReport/jacocoTestReport.xml"
build:
pre_ci_boot:
image_name: codestare/shippable-android-buildimage
image_tag: latest
pull: true
ci:
# accept licenses - create a folder to store the license CRC
- mkdir "$ANDROID_HOME/licenses" || true
- echo -e "\n8933bad161af4178b1185d1a37fbf41ea5269c55" > "$ANDROID_HOME/licenses/android-sdk-license"
- echo -e "\n84831b9409646a918e30573bab4c9c91346d8abd" > "$ANDROID_HOME/licenses/android-sdk-preview-license"
# install missing Android dependencies
- echo y | android update sdk --no-ui --all --filter "android-15,android-21,android-22,android-25,build-tools-24.0.3"
- echo y | android update sdk --no-ui --all --filter "extra-android-support,extra-google-m2repository,extra-android-m2repository,extra-google-google_play_services"
- echo y | android update sdk -a -u -t "sys-img-armeabi-v7a-android-21"
# create folders for reports
- mkdir -p shippable/testresults
- mkdir -p shippable/codecoverage
# run emulator
- export ANDROID_EMULATOR_FORCE_32BIT=true
- android list targets
- ./ui_tests_on_emulator.sh emulator64-arm
# one line build steps (don't want to pass paramaters to every gradlew command)
- ./gradlew clean assembleDebug testDebug jacocoTestReport coveralls checkstyle pmd jdepend lintDebug buildDashboard crashlyticsUploadDistributionDebug -PpreDexEnable=false -PversionCode=$BUILD_NUMBER
# convert JaCoCo to cobertura
- wget -O cover2cover.py https://raw.githubusercontent.com/rix0rrr/cover2cover/master/cover2cover.py
- python cover2cover.py $JACOCO_REPORT_LOCATION app/src/main/java > shippable/codecoverage/coverage.xml
# copy reports for Shippable
- cp -r app/build/test-results/* shippable/testresults/
integrations:
notifications:
- integrationName: email
type: email
recipients:
- veaceslav.gaidarji@yopeso.com
on_success: change
on_failure: always