Daniel Zlotin 7 lat temu
rodzic
commit
0003bd072a
1 zmienionych plików z 11 dodań i 6 usunięć
  1. 11
    6
      scripts/test.android.js

+ 11
- 6
scripts/test.android.js Wyświetl plik

@@ -1,6 +1,15 @@
1 1
 const exec = require('shell-utils').exec;
2 2
 
3
+function unitTests() {
4
+  exec.execSync(`cd lib/android && ./gradlew clean testDebugUnitTest`);
5
+}
6
+
3 7
 function e2e() {
8
+  if (!process.env.CI) {
9
+    console.log(`e2e disabled on CI`); //eslint-disable-line
10
+    return;
11
+  }
12
+
4 13
   try {
5 14
     exec.execSync(`echo 'travis_fold:start:android-e2e'`);
6 15
     exec.execSync(`yarn run uninstall-android`);
@@ -15,12 +24,8 @@ function run() {
15 24
   if (process.env.CI) {
16 25
     exec.execSync(`./scripts/installAndroidSDK.sh`);
17 26
   }
18
-
19
-  exec.execSync(`cd lib/android && ./gradlew clean testDebugUnitTest`);
20
-
21
-  if (!process.env.CI) {
22
-    e2e();
23
-  }
27
+  unitTests();
28
+  e2e();
24 29
 }
25 30
 
26 31
 run();