Browse Source

fixed travis

Daniel Zlotin 8 years ago
parent
commit
31dd4a9dfd
3 changed files with 19 additions and 26 deletions
  1. 1
    7
      .travis.yml
  2. 18
    0
      scripts/travis.js
  3. 0
    19
      scripts/travis.sh

+ 1
- 7
.travis.yml View File

@@ -33,13 +33,7 @@ install:
33 33
 
34 34
 script:
35 35
   - set -e
36
-  #- yarn install
37
-  #- yarn run lint
38
-  #- yarn run test-js
39
-  #- yarn run test-android
40
-  #- yarn run test-ios
41
-  - ./scripts/travis.sh
42
-  - yarn run release
36
+  - node ./scripts/travis.js
43 37
   - set +e
44 38
 
45 39
 after_script:

+ 18
- 0
scripts/travis.js View File

@@ -0,0 +1,18 @@
1
+const exec = require('shell-utils').exec;
2
+
3
+function travisRun(cmd) {
4
+  exec.execSync(`echo "travis_fold:start:${cmd}"`);
5
+  exec.execSync(cmd);
6
+  exec.execSync(`echo "travis_fold:end:${cmd}"`);
7
+}
8
+
9
+function run() {
10
+  travisRun(`yarn install`);
11
+  travisRun(`yarn run lint`);
12
+  travisRun(`yarn run test-js`);
13
+  travisRun(`yarn run test-android`);
14
+  travisRun(`yarn run test-ios`);
15
+  travisRun(`yarn run release`);
16
+}
17
+
18
+run();

+ 0
- 19
scripts/travis.sh View File

@@ -1,19 +0,0 @@
1
-#!/bin/bash -ex
2
-
3
-cd playground
4
-yarn install
5
-
6
-echo "************ 1"
7
-
8
-RCT_NO_LAUNCH_PACKAGER=true cd ios && xcodebuild -scheme playground_release_Detox build -project playground.xcodeproj -sdk iphonesimulator -derivedDataPath ./DerivedData/playground | xcpretty
9
-cd ..
10
-
11
-echo "************ 2"
12
-
13
-./node_modules/.bin/detox-server &
14
-
15
-echo "************ 3"
16
-
17
-detoxAppBuildPath="ios/DerivedData/playground/Build/Products/Release_Detox-iphonesimulator/playground.app" BABEL_ENV=test ./node_modules/mocha/bin/mocha e2e --timeout 240000 --recursive --compilers js:babel-register
18
-
19
-echo "************ 4"