diff --git a/.travis.yml b/.travis.yml index eebd6aca8..c9dea2fe4 100644 --- a/.travis.yml +++ b/.travis.yml @@ -11,8 +11,15 @@ env: cache: directories: - "$HOME/.npm" -install: npm ci +before_install: +# package-lock.json was introduced in npm@5 +- '[[ $(node -v) =~ ^v9.*$ ]] || npm install -g npm@latest' # skipped when using node 9 +- npm install -g greenkeeper-lockfile +install: +- if [[ ${TRAVIS_BRANCH:0:11} = greenkeeper ]]; then npm install; else npm ci; fi +before_script: greenkeeper-lockfile-update script: npm run $NPM_SCRIPT +after_script: greenkeeper-lockfile-upload jobs: include: - env: NPM_SCRIPT=lint