From 899b11b1a2a11d047b1cad2b702d42c151252ccc Mon Sep 17 00:00:00 2001 From: Jerjou Cheng Date: Fri, 24 Mar 2017 11:30:08 -0700 Subject: [PATCH] Streamline testing. --- circle.yml | 12 +++++------- travis.sh | 16 +++++++++------- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/circle.yml b/circle.yml index 08eab79a2d7..4d1bfd6efbb 100644 --- a/circle.yml +++ b/circle.yml @@ -1,17 +1,15 @@ machine: java: version: oraclejdk8 - environment: - chromedriver_path: /usr/local/bin/chromedriver dependencies: pre: - - sudo mkdir /opt/webdriver/ - curl -LO https://github.com/mozilla/geckodriver/releases/download/v0.15.0/geckodriver-v0.15.0-linux64.tar.gz - && sudo tar -zxf geckodriver-*.tar.gz -C /opt/webdriver/ + && sudo tar -zxf geckodriver-*.tar.gz -C "${HOME}/bin" - sudo apt-add-repository "deb http://archive.ubuntu.com/ubuntu trusty-backports main restricted universe" - - sudo apt-get update - - sudo apt-get install -t trusty-backports shellcheck + && sudo apt-get update + && sudo apt-get install -t trusty-backports shellcheck - sudo apt-get install expect test: override: - - bash ./travis.sh + - bash ./travis.sh && + bash <(curl -s https://codecov.io/bash) # If successful, run code coverage diff --git a/travis.sh b/travis.sh index e2e271ba9a0..87d2670c4e7 100755 --- a/travis.sh +++ b/travis.sh @@ -14,19 +14,19 @@ # limitations under the License. set -e -set -x -# Set pipefail so that `egrep` does not eat the exit code. -set -o pipefail -shopt -s globstar - -# Setup GCP application default credentials +# Setup GCP application default credentials before `set -x` echos everything out if [[ $GCLOUD_SERVICE_KEY ]]; then echo "$GCLOUD_SERVICE_KEY" | \ base64 --decode --ignore-garbage > "${HOME}/google-cloud-service-key.json" export GOOGLE_APPLICATION_CREDENTIALS="${HOME}/google-cloud-service-key.json" fi +set -x +# Set pipefail so that `egrep` does not eat the exit code. +set -o pipefail +shopt -s globstar + SKIP_TESTS=false if [ -z "$GOOGLE_APPLICATION_CREDENTIALS" ] ; then @@ -76,7 +76,9 @@ common_travis_dir="$(travis_changed_files_parent)" # Give Maven a bit more memory export MAVEN_OPTS='-XX:+PrintFlagsFinal -Xmx800m -Xms400m' -"${TRAVIS_BUILD_DIR-$HOME/$CIRCLE_PROJECT_REPONAME}"/mvnw --batch-mode clean verify -e -DskipTests=$SKIP_TESTS | \ +"${TRAVIS_BUILD_DIR-$HOME/$CIRCLE_PROJECT_REPONAME}"/mvnw \ + --batch-mode clean verify -e \ + -DskipTests=$SKIP_TESTS \ egrep -v "(^\[INFO\] Download|^\[INFO\].*skipping)" [ -z "$common_travis_dir" ] || popd