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