mirror of
https://github.com/status-im/react-native.git
synced 2025-01-10 09:35:48 +00:00
a8d2079022
Summary:Implemented smarter retries for e2e tests E2e tests consist of two expensive and flaky steps: npm installation and tests execution. Our CI is configured to retry a command 3 times before terminating the test. In current setup if one of the steps fail the whole test is restarted. This change adds ad-hoc ability to retry flaky bits of e2e script independently. This will make tests fail faster when code gets broken while increasing the chances to succeed in case of random false errors. Closes https://github.com/facebook/react-native/pull/7184 Differential Revision: D3218927 fb-gh-sync-id: 9be8343484bb28aa3601b651db70fc55aa840e61 fbshipit-source-id: 9be8343484bb28aa3601b651db70fc55aa840e61
39 lines
972 B
YAML
39 lines
972 B
YAML
language: objective-c
|
|
|
|
osx_image: xcode7.3
|
|
|
|
install:
|
|
- 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.3
|
|
- 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 node ./scripts/run-ci-e2e-tests.js --ios --js --retries 3; fi
|
|
- if [[ "$TEST_TYPE" = js ]]; then npm run flow check; fi
|
|
- if [[ "$TEST_TYPE" = js ]]; then npm test -- --maxWorkers=1; fi
|
|
|
|
env:
|
|
matrix:
|
|
- TEST_TYPE=e2e-objc
|
|
- TEST_TYPE=objc
|
|
- TEST_TYPE=js
|
|
|
|
branches:
|
|
only:
|
|
- master
|
|
- /^.*-stable$/
|
|
|
|
notifications:
|
|
email:
|
|
recipients:
|
|
- bestander@gmail.com
|
|
on_failure: change
|
|
on_success: change
|