react-native/.travis.yml
Konstantin Raev a611ec5f23 Added e2e tests for npm@2 and npm@3
Summary:Need to make sure we can use both versions of npm client for publishing and installing

**Test plan (required)**

Make sure tests pass on both Travis and Circle CI.
Closes https://github.com/facebook/react-native/pull/6364

Differential Revision: D3036537

fb-gh-sync-id: a3c1ea16f0aeb7b1327574b511aac7594fd3d7e6
shipit-source-id: a3c1ea16f0aeb7b1327574b511aac7594fd3d7e6
2016-03-10 11:59:25 -08:00

67 lines
1.3 KiB
YAML

language: objective-c
osx_image: xcode7.2
install:
- brew reinstall nvm
- mkdir -p .nvm
- export NVM_DIR="$PWD/.nvm"
- source $(brew --prefix nvm)/nvm.sh
- nvm install 5
- rm -Rf "${TMPDIR}/jest_preprocess_cache"
- npm config set spin=false
- npm config set progress=false
- npm install
script:
- |
if [ "$TEST_TYPE" = objc ]
then
travis_retry ./scripts/objc-test.sh
elif [ "$TEST_TYPE" = js ]
then
npm install github@0.2.4
cat <(echo eslint; npm run lint --silent -- --format=json; echo flow; npm run flow --silent -- --json) | GITHUB_TOKEN="af6ef0d15709bc91d""06a6217a5a826a226fb57b7" node bots/code-analysis-bot.js
npm run flow && npm test
# testing js e2e with npm3
npm install -g npm@3
npm --version
./scripts/e2e-test.sh --packager
# testing js e2e with npm2
rm -rf node_modules
npm install -g npm@2
npm install
npm --version
./scripts/e2e-test.sh --packager
elif [ "$TEST_TYPE" = e2e-objc ]
then
travis_retry ./scripts/e2e-test.sh --ios
else
echo "Unknown test type: $TEST_TYPE"
exit 1
fi
env:
matrix:
- TEST_TYPE=objc
- TEST_TYPE=js
- TEST_TYPE=e2e-objc
branches:
only:
- master
- /^.*-stable$/
notifications:
email:
recipients:
- bestander@gmail.com
on_failure: change
on_success: change