From 42b3382b0e08c6756478ee475c3c811ddf0a9762 Mon Sep 17 00:00:00 2001 From: Pierre-Denis Vanduynslager Date: Fri, 29 Sep 2017 16:41:48 -0400 Subject: [PATCH] ci(travis): Update .travis.yml - Avoid double build on PR - Add git fetch depth - Remove cache - Retry npm install --- .travis.yml | 30 +++++++++++++++++++++--------- 1 file changed, 21 insertions(+), 9 deletions(-) diff --git a/.travis.yml b/.travis.yml index 0b5f4663..48de6583 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,17 +1,29 @@ -dist: trusty language: node_js -cache: - directories: - - $HOME/.npm +services: + - couchdb notifications: email: false node_js: -- 8 -services: -- couchdb + - 8 + +# Trigger a push build on caribou and greenkeeper branches + PRs build on every branches +# Avoid double build on PRs (See https://github.com/travis-ci/travis-ci/issues/1147) branches: - except: - - /^v\d+\.\d+\.\d+$/ + only: + - caribou + - /^greenkeeper.*$/ + +# Retrieve 999 commits (default is 50) so semantic-release can analyze all commits when there is more than 50 on a PR +git: + depth: 999 + +# Retry install on fail to avoid failing a build on network/disk/external errors +install: + - travis_retry npm install + +script: + - npm run test + after_success: - npm run codecov - npm run semantic-release