This repository has been archived by the owner on Jan 31, 2021. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Manually install nvm and node versions
- Loading branch information
Showing
1 changed file
with
36 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,39 @@ | ||
language: node_js | ||
node_js: | ||
- "0.12" | ||
- 4 | ||
- 5 | ||
- iojs-v2 | ||
- iojs-v3 | ||
env: | ||
matrix: | ||
- export NODE_VERSION="0.12" | ||
- export NODE_VERSION="4" | ||
- export NODE_VERSION="5" | ||
- export NODE_VERSION="iojs-v2" | ||
- export NODE_VERSION="iojs-v3" | ||
os: | ||
- linux | ||
- osx | ||
- linux | ||
- osx | ||
before_install: | ||
- "[ $TRAVIS_OS_NAME=osx ] && brew update" | ||
- "[ $TRAVIS_OS_NAME=osx ] && (brew outdated nvm || brew upgrade nvm)" | ||
- if [ "$TRAVIS_OS_NAME" == 'osx' ]; then | ||
brew update; | ||
brew install nvm; | ||
export NVM_DIR="~/.nvm"; | ||
source "$(brew --prefix nvm)/nvm.sh" || true; | ||
fi | ||
- nvm install "$NODE_VERSION" | ||
install: | ||
- if [ "$TRAVIS_OS_NAME" == 'osx' ]; then | ||
export NVM_DIR="~/.nvm"; | ||
source "$(brew --prefix nvm)/nvm.sh" || true; | ||
fi | ||
- nvm use --delete-prefix "$NODE_VERSION" | ||
- npm install | ||
script: | ||
- if [ "$TRAVIS_OS_NAME" == 'osx' ]; then | ||
export NVM_DIR="~/.nvm"; | ||
source "$(brew --prefix nvm)/nvm.sh" || true; | ||
fi | ||
- nvm use --delete-prefix "$NODE_VERSION" | ||
- npm test | ||
after_success: | ||
- npm run coveralls | ||
- if [ "$TRAVIS_OS_NAME" == 'osx' ]; then | ||
export NVM_DIR="~/.nvm"; | ||
source "$(brew --prefix nvm)/nvm.sh" || true; | ||
fi | ||
- nvm use --delete-prefix "$NODE_VERSION" | ||
- npm run coveralls |