2015-03-10 19:11:28 -07:00
|
|
|
language: objective-c
|
2015-04-03 09:34:18 -07:00
|
|
|
|
2015-09-08 17:59:13 -07:00
|
|
|
osx_image: xcode7
|
2015-05-29 23:42:03 +01:00
|
|
|
|
2015-04-03 09:34:18 -07:00
|
|
|
cache:
|
2015-05-30 01:01:56 +01:00
|
|
|
directories:
|
|
|
|
- node_modules
|
|
|
|
- .nvm
|
2015-04-03 09:34:18 -07:00
|
|
|
|
2015-03-10 19:11:28 -07:00
|
|
|
install:
|
2015-09-08 17:59:13 -07:00
|
|
|
- brew reinstall nvm
|
2015-05-30 01:01:56 +01:00
|
|
|
- mkdir -p .nvm
|
2015-08-21 11:37:11 -07:00
|
|
|
- export NVM_DIR="$PWD/.nvm"
|
2015-05-30 01:01:56 +01:00
|
|
|
- source $(brew --prefix nvm)/nvm.sh
|
2015-09-03 15:48:22 -07:00
|
|
|
- nvm install 4
|
2015-09-08 17:59:13 -07:00
|
|
|
- rm -Rf "${TMPDIR}/jest_preprocess_cache"
|
2015-04-10 19:20:48 -07:00
|
|
|
- npm config set spin=false
|
2015-09-08 17:59:13 -07:00
|
|
|
- npm install -g flow-bin@`node -p "require('fs').readFileSync('.flowconfig', 'utf8').split('[version]')[1].trim()"`
|
2015-03-10 19:11:28 -07:00
|
|
|
- npm install
|
2015-04-01 18:10:51 -07:00
|
|
|
|
|
|
|
script:
|
2015-03-27 19:35:48 -07:00
|
|
|
- |
|
2015-04-01 18:10:51 -07:00
|
|
|
if [ "$TEST_TYPE" = objc ]
|
|
|
|
then
|
|
|
|
|
2015-04-22 16:04:06 -07:00
|
|
|
./scripts/objc-test.sh
|
2015-04-01 18:10:51 -07:00
|
|
|
|
|
|
|
elif [ "$TEST_TYPE" = js ]
|
|
|
|
then
|
|
|
|
|
2015-09-23 14:01:21 -07:00
|
|
|
flow check && npm test -- '\/Libraries\/'
|
|
|
|
|
|
|
|
elif [ "$TEST_TYPE" = packager ]
|
|
|
|
then
|
|
|
|
|
|
|
|
npm test -- '\/packager\/'
|
|
|
|
|
|
|
|
elif [ "$TEST_TYPE" = cli ]
|
|
|
|
then
|
|
|
|
|
|
|
|
npm test -- '\/(local|private|react-native)-cli\/'
|
2015-04-01 18:10:51 -07:00
|
|
|
|
|
|
|
elif [ "$TEST_TYPE" = build_website ]
|
|
|
|
then
|
|
|
|
|
2015-04-01 18:23:58 -07:00
|
|
|
cd website
|
2015-08-13 14:39:01 +01:00
|
|
|
$(which npm) install
|
2015-04-01 18:23:58 -07:00
|
|
|
./setup.sh
|
2015-04-01 18:10:51 -07:00
|
|
|
if [ "$TRAVIS_PULL_REQUEST" = false ] && [ "$TRAVIS_BRANCH" = master ]; then
|
2015-04-01 18:23:58 -07:00
|
|
|
# Automatically publish the website
|
2015-04-01 18:10:51 -07:00
|
|
|
echo "machine github.com login reactjs-bot password $GITHUB_TOKEN" >~/.netrc
|
|
|
|
./publish.sh
|
2015-04-01 18:23:58 -07:00
|
|
|
else
|
|
|
|
# Make sure the website builds without error
|
|
|
|
node server/generate.js
|
2015-04-01 18:10:51 -07:00
|
|
|
fi
|
|
|
|
|
2015-04-10 19:07:56 -07:00
|
|
|
elif [ "$TEST_TYPE" = e2e ]
|
|
|
|
then
|
|
|
|
./scripts/e2e-test.sh
|
2015-04-01 18:10:51 -07:00
|
|
|
else
|
|
|
|
echo "Unknown test type: $TEST_TYPE"
|
|
|
|
exit 1
|
2015-03-27 19:35:48 -07:00
|
|
|
fi
|
2015-03-20 14:34:34 -07:00
|
|
|
|
|
|
|
env:
|
2015-04-01 18:10:51 -07:00
|
|
|
matrix:
|
|
|
|
- TEST_TYPE=objc
|
|
|
|
- TEST_TYPE=js
|
2015-09-23 14:01:21 -07:00
|
|
|
- TEST_TYPE=packager
|
|
|
|
- TEST_TYPE=cli
|
2015-04-01 18:10:51 -07:00
|
|
|
- TEST_TYPE=build_website
|
2015-04-10 19:07:56 -07:00
|
|
|
- TEST_TYPE=e2e
|
2015-03-27 19:35:48 -07:00
|
|
|
global:
|
2015-10-14 14:54:02 -07:00
|
|
|
# $GITHUB_TOKEN
|
2015-03-27 19:35:48 -07:00
|
|
|
- secure: "HlmG8M2DmBUSBh6KH1yVIe/8gR4iibg4WfcHq1x/xYQxGbvleq7NOo04V6eFHnl9cvZCu+PKH0841WLnGR7c4BBf47GVu/o16nXzggPumHKy++lDzxFPlJ1faMDfjg/5vjbAxRUe7D3y98hQSeGHH4tedc8LvTaFLVu7iiGqvjU="
|
2015-10-14 14:54:02 -07:00
|
|
|
# $APPETIZE_TOKEN
|
2015-10-14 14:46:31 -07:00
|
|
|
- secure: "egsvVSpszTzrNd6bN62DsVAzMiSZI/OHgdizfPryqvqWBf655ztE6XFQSEFNpuIAzSKDDF25ioT8iPfVsbC1iK6HDWHfmqYxML0L+OoU0gi+hV2oKUBFZDZ1fwSnFoWuBdNdMDpLlUxvJp6N1WyfNOB2dxuZUt8eTt48Hi3+Hpc="
|
2015-10-14 14:54:02 -07:00
|
|
|
# $S3_TOKEN
|
|
|
|
- secure: "lY8JZPA0A7zT7L5KF9BBg34XYWIeR/RJiEvE7l7oVr88KnEPtyd//79eHhhVKnUnav7zsk5QJwkcX0MxKTp/dp4G0Am+zOX+sfA8kQrJ+2/+FzFW7AEsW/kHByfaIEIly9DQvUFt4I4oMm8nQZysJLahDgNWglyI3RTuJp//hcY="
|
2015-03-20 14:34:34 -07:00
|
|
|
|
2015-03-15 18:46:48 -07:00
|
|
|
branches:
|
|
|
|
only:
|
|
|
|
- master
|
2015-11-05 15:07:47 -08:00
|
|
|
- /^.*-stable$/
|