1+ env :
2+ global :
3+ - DATE=$(date +%Y-%m-%d)
4+ - PACKAGE_VERSION=$DATE-$TRAVIS_BUILD_NUMBER
5+ - PACKAGE_NAME=tns-core-modules
6+ - NODE_VERSION=5.10.1
7+ - EMULATOR_API_VER=21
8+ - RUNTIMEVERSION=next
9+ - AVD_NAME=Arm$EMULATOR_API_VER
10+ addons :
11+ artifacts :
12+ paths : $HOME/test-run-results$PACKAGE_VERSION.xml
113sudo : required
214dist : trusty
315language : android
@@ -10,26 +22,48 @@ android:
1022 - platform-tools
1123 - tools
1224 - build-tools-23.0.3
13- - android-21
25+ - android-$EMULATOR_API_VER
1426 - android-23
1527 - extra-android-support
1628 - extra-android-m2repository
17- - sys-img-armeabi-v7a-android-21
29+ - sys-img-armeabi-v7a-android-$EMULATOR_API_VER
1830
1931before_script :
20- - nvm install 5.10.1
32+ - nvm install $NODE_VERSION
2133 - npm install -g grunt-cli
2234 - npm install
2335 - (cd build/platform-declarations && npm install)
24- - echo no | android create avd --force -n Arm21 -t android-21 -b armeabi-v7a -c 12M
25- - emulator -avd Arm21 -no-skin -no-audio -no-window &
36+ - echo no | android create avd --force -n $AVD_NAME -t android-$EMULATOR_API_VER -b armeabi-v7a -c 12M
37+ - emulator -avd $AVD_NAME -no-skin -no-audio -no-window &
2638 - android-wait-for-emulator
2739script :
2840 - jdk_switcher use oraclejdk8
2941 - grunt default &&
42+ FULL_PACKAGE_VERSION=`node -e 'console.log(require("./bin/dist/modules/package.json").version);'` &&
3043 (cd build/platform-declarations && grunt) &&
3144 echo no | npm install nativescript -g > /dev/null &&
32- grunt buildOnlyTestsApp --platform=Android --modulesPath=./bin/dist/tns-core-modules-2.0.0. tgz --runtimeVersion=next --emuPId=.*emulator.* --avd=Api21 --showEmu=false > /dev/null &&
33- grunt runOnlyTestsApp --platform=Android --modulesPath=./bin/dist/tns-core-modules-2.0.0. tgz --emuPId=.*emulator.* --avd=Api21 --showEmu=false
45+ grunt buildOnlyTestsApp --platform=Android --modulesPath=./bin/dist/$PACKAGE_NAME-$FULL_PACKAGE_VERSION. tgz --runtimeVersion=$RUNTIMEVERSION --emuPId=.*emulator.* --avd=$AVD_NAME --showEmu=false > /dev/null &&
46+ grunt runOnlyTestsApp --platform=Android --modulesPath=./bin/dist/$PACKAGE_NAME-$FULL_PACKAGE_VERSION. tgz --emuPId=.*emulator.* --avd=$AVD_NAME --showEmu=false
3447
3548 - node ./build/travis-scripts/check-testrun-broken.js
49+ - adb pull /data/data/org.nativescript.TestsApp/files/test-results.xml &&
50+ mv test-results.xml ~/test-run-results$PACKAGE_VERSION.xml
51+ before_deploy :
52+ - mv bin/dist/$PACKAGE_NAME-$FULL_PACKAGE_VERSION.tgz ../.deploymentpackage
53+ - mv .build ../
54+ - cd ..
55+ - rm -rf NativeScript
56+ - tar -zxvf .deploymentpackage
57+ - mv package $PACKAGE_NAME
58+ - cd $PACKAGE_NAME
59+ - rm ../.deploymentpackage
60+ - mv ../build ./
61+ - node ./build/travis-scripts/add-publishConfig.js next
62+ deploy :
63+ provider : npm
64+ email : nativescript@telerik.com
65+ on :
66+ branch : master
67+ skip_cleanup : true
68+ api_key :
69+ secure : aFJZR8VIbFAlXfFx5G2AveSgpGjr40prghvw8m06X0yvmUQlucwHVyq+Ov0ZD94br8d7OUOPbUzh+p9N/+oXLAXOj3DbQmJaCc+fk/e+avHu1BRy3fg295P9BQau1Abu+2ZO7tUbg5zAqJqhbEgjXsr9B5gxl+vwh4lbDhCPCwo=
0 commit comments