mirror of
https://github.com/status-im/react-native.git
synced 2025-01-09 17:15:54 +00:00
03c874cb7f
The packager and cli tests now run independently of the RN JS tests. When the packager moves to its own repo we can just remove the packager entry from .travis.yml. The cli tests are also marked as allowed to fail for now.
82 lines
1.7 KiB
YAML
82 lines
1.7 KiB
YAML
language: objective-c
|
|
|
|
osx_image: xcode7
|
|
|
|
cache:
|
|
directories:
|
|
- node_modules
|
|
- .nvm
|
|
|
|
install:
|
|
- brew reinstall nvm
|
|
- mkdir -p .nvm
|
|
- export NVM_DIR="$PWD/.nvm"
|
|
- source $(brew --prefix nvm)/nvm.sh
|
|
- nvm install 4
|
|
- rm -Rf "${TMPDIR}/jest_preprocess_cache"
|
|
- npm config set spin=false
|
|
- npm install -g flow-bin@`node -p "require('fs').readFileSync('.flowconfig', 'utf8').split('[version]')[1].trim()"`
|
|
- npm install
|
|
|
|
script:
|
|
- |
|
|
if [ "$TEST_TYPE" = objc ]
|
|
then
|
|
|
|
./scripts/objc-test.sh
|
|
|
|
elif [ "$TEST_TYPE" = js ]
|
|
then
|
|
|
|
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\/'
|
|
|
|
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
|
|
|
|
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=packager
|
|
- TEST_TYPE=cli
|
|
- TEST_TYPE=build_website
|
|
- TEST_TYPE=e2e
|
|
allow_failures:
|
|
- TEST_TYPE=cli
|
|
global:
|
|
- secure: "HlmG8M2DmBUSBh6KH1yVIe/8gR4iibg4WfcHq1x/xYQxGbvleq7NOo04V6eFHnl9cvZCu+PKH0841WLnGR7c4BBf47GVu/o16nXzggPumHKy++lDzxFPlJ1faMDfjg/5vjbAxRUe7D3y98hQSeGHH4tedc8LvTaFLVu7iiGqvjU="
|
|
|
|
branches:
|
|
only:
|
|
- master
|