react-native/.travis.yml

71 lines
1.6 KiB
YAML
Raw Normal View History

language: objective-c
2015-04-03 16:34:18 +00:00
osx_image: xcode6.4
2015-04-03 16:34:18 +00:00
cache:
directories:
- node_modules
- .nvm
2015-04-03 16:34:18 +00:00
2015-03-18 04:12:13 +00:00
before_install:
# Update brew twice because the first run can fail: https://github.com/Homebrew/homebrew/issues/42553
- brew update; brew update
install:
2015-07-30 18:28:19 +00:00
- brew reinstall xctool nvm
- mkdir -p .nvm
- export NVM_DIR="$PWD/.nvm"
- source $(brew --prefix nvm)/nvm.sh
- nvm install iojs-v3
- rm -Rf `node -p "require('os').tmpDir()"`/jest_preprocess_cache
- npm install -g flow-bin@`node -p "require('fs').readFileSync('.flowconfig', 'utf8').split('[version]')[1].trim()"`
2015-04-11 02:20:48 +00:00
- npm config set spin=false
- npm install
script:
- |
if [ "$TEST_TYPE" = objc ]
then
2015-04-22 23:04:06 +00:00
./scripts/objc-test.sh
elif [ "$TEST_TYPE" = js ]
then
2015-04-03 16:15:11 +00:00
flow check && npm test
elif [ "$TEST_TYPE" = build_website ]
then
cd website
$(which npm) install
./setup.sh
if [ "$TRAVIS_PULL_REQUEST" = false ] && [ "$TRAVIS_BRANCH" = master ]; then
# Automatically publish the website
echo "machine github.com login reactjs-bot password $GITHUB_TOKEN" >~/.netrc
./publish.sh
else
# Make sure the website builds without error
node server/generate.js
fi
2015-04-11 02:07:56 +00:00
elif [ "$TEST_TYPE" = e2e ]
then
./scripts/e2e-test.sh
else
echo "Unknown test type: $TEST_TYPE"
exit 1
fi
env:
matrix:
- TEST_TYPE=objc
- TEST_TYPE=js
- TEST_TYPE=build_website
2015-04-11 02:07:56 +00:00
- TEST_TYPE=e2e
global:
- secure: "HlmG8M2DmBUSBh6KH1yVIe/8gR4iibg4WfcHq1x/xYQxGbvleq7NOo04V6eFHnl9cvZCu+PKH0841WLnGR7c4BBf47GVu/o16nXzggPumHKy++lDzxFPlJ1faMDfjg/5vjbAxRUe7D3y98hQSeGHH4tedc8LvTaFLVu7iiGqvjU="
branches:
only:
- master