Skip to content

Commit 9e5ae53

Browse files
committed
chore(tests): Turn on OSX build and add build_scripts folder for complext travis commands
1 parent 1e3498b commit 9e5ae53

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

.travis.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ env:
66
os:
77
- linux
88
- osx
9-
109
script: npm run-script test
1110
before_install:
11+
- source build_scripts/osx-before_install.sh
1212
- nvm install $NODE_VERSION
1313
- npm config set spin false
1414
install:

build_scripts/osx-before_install.sh

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# no shebang as it expects to be run in the current shell, not standalone
2+
if [[ $TRAVIS_OS_NAME == "osx" ]]; then
3+
# Recommended by travis guys to always brew update first
4+
brew update
5+
# Install NVM
6+
brew install nvm
7+
# Use -p just in case the folder already exists
8+
mkdir -p ~/.nvm
9+
# Make sure the NVM_DIR is set before sourcing nvm.sh
10+
export NVM_DIR=~/.nvm && source $(brew --prefix nvm)/nvm.sh
11+
nvm alias default $NODE_VERSION
12+
fi

0 commit comments

Comments
 (0)