Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,10 @@ env:

os:
- linux
- osx
script: npm run-script test
before_install:
- source build_scripts/osx-before_install.sh
- nvm install $NODE_VERSION
- npm config set spin false
install:
Expand Down
12 changes: 12 additions & 0 deletions build_scripts/osx-before_install.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# no shebang as it expects to be run in the current shell, not standalone
if [[ $TRAVIS_OS_NAME == "osx" ]]; then
# Recommended by travis guys to always brew update first
brew update
# Install NVM
brew install nvm
# Use -p just in case the folder already exists
mkdir -p ~/.nvm
# Make sure the NVM_DIR is set before sourcing nvm.sh
export NVM_DIR=~/.nvm && source $(brew --prefix nvm)/nvm.sh
nvm alias default $NODE_VERSION
fi