mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-04-24 04:16:00 +08:00
Summary:Travis tests have been flaky recently: https://travis-ci.org/facebook/react-native/builds Clicking through the last 10 failures, 8 of them are caused by the `npm install` flakiness in the `./e2e-test.sh --packager`. This test works in a very similar way to the iOS e2e test which we retry (see line 18). Let's be consistent. All the random errors are 404s during `npm install` through Sinopia:  JS tests are more stable (saw 1 random failure but likely the test can be fixed), let's not retry them just yet:  **Test plan (required)** Travis tests on this pull request. Closes https://github.com/facebook/react-native/pull/6604 Differential Revision: D3087044 fb-gh-sync-id: a5c74e2578617656c67fd4d05d4f60ffe63a5e2a shipit-source-id: a5c74e2578617656c67fd4d05d4f60ffe63a5e2a
41 lines
1.0 KiB
YAML
41 lines
1.0 KiB
YAML
language: objective-c
|
|
|
|
osx_image: xcode7.2
|
|
|
|
install:
|
|
- brew reinstall nvm
|
|
- mkdir -p /Users/travis/build/facebook/.nvm
|
|
- export NVM_DIR="/Users/travis/build/facebook/.nvm"
|
|
- source $(brew --prefix nvm)/nvm.sh
|
|
# testing with npm@2 for diversity, Circle tests with npm@3
|
|
- nvm install 4.4.0
|
|
- 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; fi
|
|
- if [[ "$TEST_TYPE" = e2e-objc ]]; then travis_retry ./scripts/e2e-test.sh --ios; fi
|
|
- if [[ "$TEST_TYPE" = js ]]; then npm run flow check; fi
|
|
- if [[ "$TEST_TYPE" = js ]]; then npm test -- --maxWorkers=1; fi
|
|
- if [[ "$TEST_TYPE" = js ]]; then travis_retry ./scripts/e2e-test.sh --packager; 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
|