#1175 reformat travis file

This commit is contained in:
Sean Mac Gillicuddy 2019-05-29 12:41:09 +01:00
parent 4887ec435d
commit 0d47467911

View File

@ -17,18 +17,22 @@ before_install:
install: install:
- pip install --user 'requests[security]' - pip install --user 'requests[security]'
- wget -r -nH -nd -np -R index.html* robots.txt* http://download.kiwix.org/dev/android/api/licenses/ -e robots=off -P $ANDROID_HOME/licenses || true - wget -r -nH -nd -np -R index.html* robots.txt* http://download.kiwix.org/dev/android/api/licenses/ -e robots=off -P $ANDROID_HOME/licenses || true
addons: addons:
apt: apt:
packages: packages:
- lynx - lynx
before_cache: before_cache:
- rm -f $HOME/.gradle/caches/modules-2/modules-2.lock - rm -f $HOME/.gradle/caches/modules-2/modules-2.lock
- rm -fr $HOME/.gradle/caches/*/plugin-resolution/ - rm -fr $HOME/.gradle/caches/*/plugin-resolution/
cache: cache:
directories: directories:
- "$HOME/.gradle/caches/" - "$HOME/.gradle/caches/"
- "$HOME/.gradle/wrapper/" - "$HOME/.gradle/wrapper/"
- "$HOME/.android/build-cache" - "$HOME/.android/build-cache"
android: android:
components: components:
- tools - tools
@ -36,17 +40,23 @@ android:
- build-tools-28.0.3 - build-tools-28.0.3
- android-27 - android-27
- extra-android-m2repository - extra-android-m2repository
licenses: licenses:
- ".+" - ".+"
script: script:
- "./gradlew lintKiwixDebug jacocoTestKiwixDebugUnitTestReport assembleKiwixRelease" - ./gradlew lintKiwixDebug jacocoTestKiwixDebugUnitTestReport assembleKiwixRelease
- if [$TRAVIS_PULL_REQUEST == “false” ] && [ $TRAVIS_BRANCH == “release” ]; then ./gradlew publishKiwixRelease; - if [$TRAVIS_PULL_REQUEST == “false” ] && [ $TRAVIS_BRANCH == “release” ]; then
./gradlew publishKiwixRelease;
fi fi
- if [$TRAVIS_TAG != “” ] && [$TRAVIS_PULL_REQUEST == “false” ] && [ $TRAVIS_BRANCH - if [$TRAVIS_TAG != “” ] && [$TRAVIS_PULL_REQUEST == “false” ] && [ $TRAVIS_BRANCH == “master” ]; then
== “master” ]; then ./gradlew publishKiwixRelease; fi ./gradlew publishKiwixRelease;
fi
after_success: after_success:
- bash <(curl -s https://codecov.io/bash) - bash <(curl -s https://codecov.io/bash)
- "./gradlew testdroidUploadKiwixDebug" - ./gradlew testdroidUploadKiwixDebug
after_failure: after_failure:
- export LOG_DIR = ${TRAVIS_HOME}/build/kiwix/kiwix-android/app/build/outputs/reports/androidTests/connected/flavors/KIWIX/ - export LOG_DIR = ${TRAVIS_HOME}/build/kiwix/kiwix-android/app/build/outputs/reports/androidTests/connected/flavors/KIWIX/
- lynx --dump ${LOG_DIR}com.android.builder.testing.ConnectedDevice.html - lynx --dump ${LOG_DIR}com.android.builder.testing.ConnectedDevice.html