Skip to content

Commit

Permalink
Enable e2e on travis (#26)
Browse files Browse the repository at this point in the history
Enable e2e tests on travis
  • Loading branch information
ptomasroos authored Nov 7, 2018
1 parent ddb7d84 commit 503e540
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 7 deletions.
50 changes: 46 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,47 @@
language: node_js
os: osx
node_js:
- '10'
cache: yarn
node_js: 8.9.4

cache:
directories:
- node_modules
- examples/Basic/node_modules

matrix:
include:
- language: objective-c
osx_image: xcode9.4
xcode_sdk: iphonesimulator11.0

addons:
artifacts: true

env:
global:
- NODE_VERSION=stable
- CODE_SIGNING_REQUIRED=NO

install:
- curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.11/install.sh | bash
- export NVM_DIR="$HOME/.nvm" && [ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh"
- nvm install $NODE_VERSION
- nvm use $NODE_VERSION
- brew install watchman
- brew tap wix/brew
- brew install wix/brew/applesimutils
- npm install -g react-native-cli
- npm install -g detox-cli
- npm install
- cd examples/Basic && npm install
- cd ..
- cd ..

script:
- npm run test
- cd examples/Basic
- detox build > /dev/null 2>&1
- detox clean-framework-cache && detox build-framework-cache
- react-native start &
- detox test -l verbose --cleanup

after_failure:
- tail -F $HOME/Library/Developer/CoreSimulator/Devices/8ABF0B4E-0370-4D7D-B9F6-E508760687A5/data/tmp/detox.last_launch_app_log.err
4 changes: 1 addition & 3 deletions examples/Basic/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@
"postinstall": "rm -fr node_modules/react-native-idfa/* && cd .. && cd .. && npm pack && tar -zxvf react-native-idfa-*.tgz --strip-components 1 --directory examples/Basic/node_modules/react-native-idfa/",
"start": "node node_modules/react-native/local-cli/cli.js start",
"start-sync": "sane '/usr/bin/rsync -v -a ./node_modules/react-native-idfa/ ../../' ./node_modules/react-native-idfa/ --glob=** --watchman",
"test:e2e": "detox test -c ios.sim.debug",
"test:e2e:build": "detox build",
"test": "jest"
},
"dependencies": {
Expand Down Expand Up @@ -39,7 +37,7 @@
"binaryPath": "ios/build/Build/Products/Debug-iphonesimulator/Basic.app",
"build": "xcodebuild -project ios/Basic.xcodeproj -scheme Basic -configuration Debug -sdk iphonesimulator -derivedDataPath ios/build",
"type": "ios.simulator",
"name": "iPhone "
"name": "iPhone 7"
}
},
"test-runner": "jest",
Expand Down

0 comments on commit 503e540

Please sign in to comment.