Browse Source

trying one last time

Daniel Zlotin 8 years ago
parent
commit
c64a56ab33
3 changed files with 40 additions and 34 deletions
  1. 5
    5
      .travis.yml
  2. 19
    27
      playground/scripts/e2e.ios.js
  3. 16
    2
      scripts/travis.sh

+ 5
- 5
.travis.yml View File

33
 
33
 
34
 script:
34
 script:
35
   - set -e
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
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
41
   - ./scripts/travis.sh
42
   - yarn run release
42
   - yarn run release
43
   - set +e
43
   - set +e

+ 19
- 27
playground/scripts/e2e.ios.js View File

17
   shellUtils.exec.execSync(`./scripts/detoxDebugFix.rb ${release ? '' : 'debug'}`);
17
   shellUtils.exec.execSync(`./scripts/detoxDebugFix.rb ${release ? '' : 'debug'}`);
18
 
18
 
19
   shellUtils.exec.execSync(`echo -en 'travis_fold:start:xcodebuild\n'`);
19
   shellUtils.exec.execSync(`echo -en 'travis_fold:start:xcodebuild\n'`);
20
-
21
   const cmd = `RCT_NO_LAUNCH_PACKAGER=true
20
   const cmd = `RCT_NO_LAUNCH_PACKAGER=true
22
           cd ios && xcodebuild
21
           cd ios && xcodebuild
23
             -scheme ${scheme} build
22
             -scheme ${scheme} build
30
   } else {
29
   } else {
31
     shellUtils.exec.execSync(`${cmd}`);
30
     shellUtils.exec.execSync(`${cmd}`);
32
   }
31
   }
33
-
34
-  console.log(`*********** 1`);
35
-
36
   shellUtils.exec.execSync(`echo -en 'travis_fold:end:xcodebuild\n'`);
32
   shellUtils.exec.execSync(`echo -en 'travis_fold:end:xcodebuild\n'`);
37
-
38
-  console.log(`*********** 2`);
39
 }
33
 }
40
 function hasXcpretty() {
34
 function hasXcpretty() {
41
   try {
35
   try {
47
 
41
 
48
 function e2e() {
42
 function e2e() {
49
   try {
43
   try {
50
-    console.log(`*********** 3`);
51
-    //shellUtils.exec.execSyncSilent(`watchman watch-del-all || true`);
52
-    //shellUtils.exec.kill(`detox-server`);
44
+    shellUtils.exec.execSyncSilent(`watchman watch-del-all || true`);
45
+    shellUtils.exec.kill(`detox-server`);
53
     shellUtils.exec.exec(`./node_modules/.bin/detox-server > ./detox-server.log 2>&1`);
46
     shellUtils.exec.exec(`./node_modules/.bin/detox-server > ./detox-server.log 2>&1`);
54
-    console.log(`*********** 4`);
55
-    //const detoxAppBuildPath = `ios/DerivedData/playground/Build/Products/${release ? 'Release' : 'Debug'}_Detox-iphonesimulator/playground.app`;
56
-    //
57
-    //shellUtils.exec.execSync(`detoxAppBuildPath="${detoxAppBuildPath}"
58
-    //                          BABEL_ENV=test
59
-    //                          ./node_modules/mocha/bin/mocha e2e
60
-    //                            --timeout 120000
61
-    //                            --recursive
62
-    //                            --compilers js:babel-register`);
47
+    const detoxAppBuildPath = `ios/DerivedData/playground/Build/Products/${release ? 'Release' : 'Debug'}_Detox-iphonesimulator/playground.app`;
48
+
49
+    shellUtils.exec.execSync(`detoxAppBuildPath="${detoxAppBuildPath}"
50
+                              BABEL_ENV=test
51
+                              ./node_modules/mocha/bin/mocha e2e
52
+                                --timeout 120000
53
+                                --recursive
54
+                                --compilers js:babel-register`);
63
   } finally {
55
   } finally {
64
-    //shellUtils.exec.execSync(`./scripts/detoxDebugFix.rb`);
65
-    //shellUtils.exec.kill(`detox-server`);
66
-    //if (release) {
67
-    //  shellUtils.exec.kill(`Simulator`);
68
-    //  shellUtils.exec.kill(`CoreSimulator`);
69
-    //}
70
-    //shellUtils.exec.execSync(`cat ./detox-server.log`);
71
-    //shellUtils.exec.execSync(`rm -f ./detox-server.log`);
72
-    //shellUtils.exec.execSync(`sleep 5`);
56
+    shellUtils.exec.execSync(`./scripts/detoxDebugFix.rb`);
57
+    shellUtils.exec.kill(`detox-server`);
58
+    if (release) {
59
+      shellUtils.exec.kill(`Simulator`);
60
+      shellUtils.exec.kill(`CoreSimulator`);
61
+    }
62
+    shellUtils.exec.execSync(`cat ./detox-server.log`);
63
+    shellUtils.exec.execSync(`rm -f ./detox-server.log`);
64
+    shellUtils.exec.execSync(`sleep 5`);
73
   }
65
   }
74
 }
66
 }
75
 
67
 

+ 16
- 2
scripts/travis.sh View File

1
-#!/bin/bash -e
1
+#!/bin/bash -ex
2
 
2
 
3
 cd playground
3
 cd playground
4
-detoxAppBuildPath="ios/DerivedData/playground/Build/Products/Release_Detox-iphonesimulator/playground.app" BABEL_ENV=test ./node_modules/mocha/bin/mocha e2e --timeout 120000 --recursive --compilers js:babel-register
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
5
 cd ..
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 120000 --recursive --compilers js:babel-register
18
+
19
+echo "************ 4"