revert to stable version
MODIFY
.travis.yml
.travis.yml
@@ -6,55 +6,36 @@ env:
- ANDROID_BUILD_TOOLS=28.0.3
- NODE_VERSION=7.0.0
-services:
- - couchdb
-
before_cache:
# Do not cache a few Gradle files/directories (see https://docs.travis-ci.com/user/languages/java/#Caching)
- rm -f $HOME/.gradle/caches/modules-2/modules-2.lock
- rm -fr $HOME/.gradle/caches/*/plugin-resolution/
-#cache:
-# directories:
-# # Android SDK
-# - $HOME/android-sdk-dl
-# - $HOME/android-sdk
-#
-# # Gradle dependencies
-# - $HOME/.gradle/caches/
-# - $HOME/.gradle/wrapper/
-#
-# # Android directory
-# - $HOME/.android
-#
-# # NVM
-# - $HOME/.nvm
+cache:
+ directories:
+ # Android SDK
+ - $HOME/android-sdk-dl
+ - $HOME/android-sdk
+
+ # Gradle dependencies
+ - $HOME/.gradle/caches/
+ - $HOME/.gradle/wrapper/
+
+ # Android directory
+ - $HOME/.android
+
+ # NVM
+ - $HOME/.nvm
matrix:
include:
- os: linux
- language: node_js
env: CORDOVA_PLATFORM="browser"
-
- install:
- - nvm install ${NODE_VERSION}
- - nvm use ${NODE_VERSION}
- - node --version
- - exist=$(which cordova); if [[ -z "${exist}" ]]; then
- npm -g install cordova > /dev/null;
- fi
- - cordova --version
- - exist=$(which cordova-paramedic); if [[ -z "${exist}" ]]; then
- npm -g install cordova-paramedic > /dev/null;
- fi
- - npm i > /dev/null
- script:
- - npm run test
-
+ language: node_js
- env: CORDOVA_PLATFORM="android" ANDROID_HOME=${HOME}/android-sdk
os: linux
- jdk: oraclejdk8
language: android
+ jdk: oraclejdk8
install:
- exist=$(which nvm); if [[ -z "${exist}" ]]; then
@@ -68,21 +49,16 @@ matrix:
nvm alias default ${NODE_VERSION} > /dev/null;
nvm use default > /dev/null;
fi
- - nvm use ${NODE_VERSION}
- - node --version
- - if test ! -e $HOME/android-sdk-dl/ ; then
- mkdir -p $HOME/android-sdk-dl/;
- fi
- - if test ! -e $HOME/android-sdk-dl/sdk-tools.zip ; then
- curl https://dl.google.com/android/repository/sdk-tools-linux-4333796.zip > $HOME/android-sdk-dl/sdk-tools.zip;
- fi
- - unzip -qq -n $HOME/android-sdk-dl/sdk-tools.zip -d ${ANDROID_HOME};
- - exist=$(which cordova); if [[ -z "${exist}" ]]; then
- npm -g install cordova > /dev/null;
+ - exist=$(nvm list | grep 'v0.10.48'); if [[ ! -z "${exist}" ]]; then
+ nvm uninstall v0.10.48 > /dev/null;
fi
+ - node --version
+ - exist=$(which cordova); if [[ -z "${exist}" ]]; then npm -g install cordova > /dev/null; fi
- cordova --version
- - exist=$(which cordova-paramedic); if [[ -z "${exist}" ]]; then
- npm -g install cordova-paramedic > /dev/null;
+ - exist=$(which cordova-paramedic); if [[ -z "${exist}" ]]; then npm -g install cordova-paramedic > /dev/null; fi
+ - if [[ "${CORDOVA_PLATFORM}" == "android" ]]; then
+ if test ! -e $HOME/android-sdk-dl/sdk-tools.zip ; then curl https://dl.google.com/android/repository/sdk-tools-linux-4333796.zip > $HOME/android-sdk-dl/sdk-tools.zip; fi;
+ unzip -qq -n $HOME/android-sdk-dl/sdk-tools.zip -d ${ANDROID_HOME};
fi
- if [[ ! -e "${HOME}/.android/repositories.cfg" ]]; then
touch ${HOME}/.android/repositories.cfg > /dev/null;
@@ -90,25 +66,49 @@ matrix:
- if [[ ! -e "${HOME}/.android/avd" ]]; then
mkdir -p ${HOME}/.android/avd/ > /dev/null;
fi
- - echo "y" | ${HOME}/android-sdk/tools/bin/sdkmanager 'tools' > /dev/null
- - echo "y" | ${HOME}/android-sdk/tools/bin/sdkmanager 'platform-tools' > /dev/null
- - echo "y" | ${HOME}/android-sdk/tools/bin/sdkmanager "build-tools;${ANDROID_BUILD_TOOLS}" > /dev/null
- - echo "y" | ${HOME}/android-sdk/tools/android update sdk -a --no-ui --filter android-${ANDROID_API}
- - echo "y" | ${HOME}/android-sdk/tools/android update sdk -a --no-ui --filter sys-img-armeabi-v7a-android-${ANDROID_API}
- - echo "y" | ${HOME}/android-sdk/tools/bin/sdkmanager 'extras;google;m2repository' > /dev/null
+ - if [[ "${CORDOVA_PLATFORM}" == "android" ]]; then
+ echo "y" | ${ANDROID_HOME}/tools/bin/sdkmanager 'tools' > /dev/null;
+ fi
+ - if [[ "${CORDOVA_PLATFORM}" == "android" ]]; then
+ echo "y" | ${ANDROID_HOME}/tools/bin/sdkmanager 'platform-tools' > /dev/null;
+ fi
+ - if [[ "${CORDOVA_PLATFORM}" == "android" ]]; then
+ echo "y" | ${ANDROID_HOME}/tools/bin/sdkmanager "build-tools;${ANDROID_BUILD_TOOLS}" > /dev/null;
+ fi
+ - if [[ "${CORDOVA_PLATFORM}" == "android" ]]; then
+ echo "y" | android update sdk -a --no-ui --filter android-${ANDROID_API};
+ fi
+ - if [[ "${CORDOVA_PLATFORM}" == "android" ]]; then
+ echo "y" | android update sdk -a --no-ui --filter sys-img-armeabi-v7a-android-${ANDROID_API};
+ fi
+ - if [[ "${CORDOVA_PLATFORM}" == "android" ]]; then
+ echo "y" | ${ANDROID_HOME}/tools/bin/sdkmanager 'extras;google;m2repository' > /dev/null;
+ fi
- npm i > /dev/null
- - ${HOME}/android-sdk/tools/android list targets;
- - echo no | ${HOME}/android-sdk/tools/android create avd --force -n test -t android-${ANDROID_API} --abi armeabi-v7a
- - ${HOME}/android-sdk/tools/emulator -avd test -no-window &
- - android-wait-for-emulator
- - adb shell input keyevent 82
- - adb wait-for-device get-serialno
- script:
- - npm run test
- - cordova-paramedic --cleanUpAfterRun --platform android --plugin '. --variable API_KEY_FOR_ANDROID=test'
before_script:
- # Make sure CouchDB is up
- - while [ $? -ne 0 ]; do
- sleep 1 && curl -v http://localhost:5984;
- done
+ - if [[ "${CORDOVA_PLATFORM}" == "android" ]]; then
+ android list targets;
+ fi
+ - if [[ "${CORDOVA_PLATFORM}" == "android" ]]; then
+ echo no | android create avd --force -n test -t android-${ANDROID_API} --abi armeabi-v7a;
+ fi
+ - if [[ "${CORDOVA_PLATFORM}" == "android" ]]; then
+ emulator -avd test -no-window &
+ fi
+ - if [[ "${CORDOVA_PLATFORM}" == "android" ]]; then
+ android-wait-for-emulator;
+ fi
+ - if [[ "${CORDOVA_PLATFORM}" == "android" ]]; then
+ adb shell input keyevent 82;
+ fi
+ - if [[ "${CORDOVA_PLATFORM}" == "android" ]]; then
+ adb wait-for-device get-serialno;
+ fi
+
+
+script:
+ - npm run test
+ - if [[ "${CORDOVA_PLATFORM}" == "android" ]]; then
+ cordova-paramedic --cleanUpAfterRun --platform android --plugin '. --variable API_KEY_FOR_ANDROID=test';
+ fi

revert to stable version