Procházet zdrojové kódy

trying one last time

Daniel Zlotin před 8 roky
rodič
revize
c64a56ab33
3 změnil soubory, kde provedl 40 přidání a 34 odebrání
  1. 5
    5
      .travis.yml
  2. 19
    27
      playground/scripts/e2e.ios.js
  3. 16
    2
      scripts/travis.sh

+ 5
- 5
.travis.yml Zobrazit soubor

@@ -33,11 +33,11 @@ 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
36
+  #- yarn install
37
+  #- yarn run lint
38
+  #- yarn run test-js
39
+  #- yarn run test-android
40
+  #- yarn run test-ios
41 41
   - ./scripts/travis.sh
42 42
   - yarn run release
43 43
   - set +e

+ 19
- 27
playground/scripts/e2e.ios.js Zobrazit soubor

@@ -17,7 +17,6 @@ function buildProjForDetox() {
17 17
   shellUtils.exec.execSync(`./scripts/detoxDebugFix.rb ${release ? '' : 'debug'}`);
18 18
 
19 19
   shellUtils.exec.execSync(`echo -en 'travis_fold:start:xcodebuild\n'`);
20
-
21 20
   const cmd = `RCT_NO_LAUNCH_PACKAGER=true
22 21
           cd ios && xcodebuild
23 22
             -scheme ${scheme} build
@@ -30,12 +29,7 @@ function buildProjForDetox() {
30 29
   } else {
31 30
     shellUtils.exec.execSync(`${cmd}`);
32 31
   }
33
-
34
-  console.log(`*********** 1`);
35
-
36 32
   shellUtils.exec.execSync(`echo -en 'travis_fold:end:xcodebuild\n'`);
37
-
38
-  console.log(`*********** 2`);
39 33
 }
40 34
 function hasXcpretty() {
41 35
   try {
@@ -47,29 +41,27 @@ function hasXcpretty() {
47 41
 
48 42
 function e2e() {
49 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 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 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 Zobrazit soubor

@@ -1,5 +1,19 @@
1
-#!/bin/bash -e
1
+#!/bin/bash -ex
2 2
 
3 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 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"