Skip to content

Turn on osx build on travis #128

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from
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