Skip to content

Commit

Permalink
Merge pull request #581 from GoogleCloudPlatform/circleci
Browse files Browse the repository at this point in the history
Testing tweaks
  • Loading branch information
jerjou committed Mar 24, 2017
2 parents c49e6c1 + 899b11b commit 421efad
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 14 deletions.
12 changes: 5 additions & 7 deletions circle.yml
Original file line number Diff line number Diff line change
@@ -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
16 changes: 9 additions & 7 deletions travis.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 421efad

Please sign in to comment.