mirror of
https://github.com/status-im/react-native.git
synced 2025-01-09 17:15:54 +00:00
44997b47e2
Summary:The e2e-test.sh currently only supports iOS. Most of the script will be identical for Android, let's therefore reuse it. This diff adds one argument: --ios, --android or --packager. `--packager` starts the packager and checks it produces a bundle. The idea is to run this on CircleCI even before we implement the actual Android e2e test in order to reliably catch breakages to package.json quickly. We should only land this once Travis is green again. **Test plan** Ran: git checkout master ./scripts/e2e-test.sh # Error message about required argument was printed ./scripts/e2e-test.sh --ios # Ran the test as before (all the way up to xctool which I don't have locally) ./scripts/e2e-test.sh --android # Message was printed ./scripts/e2e-test.sh --packager # The packager created the bundle, exit code was 0 # Made the packager fails on bad JS ./scripts/e2e-test.sh --packager # Exit code was 1 Closes https://github.com/facebook/react-native/pull/6279 Differential Revision: D3007281 fb-gh-sync-id: 6ece06b933001ba0939806c69ed7c7471b134931 shipit-source-id: 6ece06b933001ba0939806c69ed7c7471b134931
62 lines
1.1 KiB
YAML
62 lines
1.1 KiB
YAML
language: objective-c
|
|
|
|
osx_image: xcode7.2
|
|
|
|
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 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
|
|
|
|
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
|