Browse Source

update scripts

Daniel Zlotin 7 years ago
parent
commit
dea6d13629
5 changed files with 15 additions and 10 deletions
  1. 5
    5
      .travis.yml
  2. 0
    2
      lib/android/app/build.gradle
  3. 3
    0
      scripts/test.e2e.android.js
  4. 5
    1
      scripts/test.unit.android.js
  5. 2
    2
      scripts/travis.sh

+ 5
- 5
.travis.yml View File

@@ -21,21 +21,21 @@ cache:
21 21
     - $HOME/.m2
22 22
 
23 23
 install:
24
-  # node
24
+        # node:
25 25
   - curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.1/install.sh | bash
26 26
   - export NVM_DIR="$HOME/.nvm" && [ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh"
27 27
   - nvm install $NODE_VERSION
28 28
   - nvm use $NODE_VERSION
29
-  # yarn
29
+        # yarn:
30 30
   - curl -o- -L https://yarnpkg.com/install.sh | bash
31 31
   - yarn config set cache-folder $YARN_CACHE
32
-  # android sdk
32
+        # android sdk:
33 33
   - ./scripts/installAndroidSDK.sh
34
-  # android emulator
34
+        # android emulator:
35 35
   #- echo yes | android update sdk --no-ui --all --filter "sys-img-armeabi-v7a-google_apis-25"
36 36
   #- echo no | android create avd --name AVD -t android-25 --abi google_apis/armeabi-v7a
37 37
   #- android list avd
38
-  # fbsimctl
38
+        # fbsimctl:
39 39
   - brew tap facebook/fb && brew install fbsimctl
40 40
 
41 41
 script:

+ 0
- 2
lib/android/app/build.gradle View File

@@ -44,8 +44,6 @@ android {
44 44
     }
45 45
 }
46 46
 
47
-task unitTest(dependsOn: 'testDebugUnitTest') {}
48
-
49 47
 dependencies {
50 48
     compile fileTree(include: ['*.jar'], dir: 'libs')
51 49
     compile 'com.android.support:design:25.1.1'

+ 3
- 0
scripts/test.e2e.android.js View File

@@ -1,5 +1,8 @@
1
+const _ = require('lodash');
1 2
 const exec = require('shell-utils').exec;
2 3
 
4
+const release = _.includes(process.argv, 'release');
5
+
3 6
 function run() {
4 7
   if (process.env.CI) {
5 8
     console.log(`android e2e disabled on CI for now`); //eslint-disable-line

+ 5
- 1
scripts/test.unit.android.js View File

@@ -1,6 +1,10 @@
1
+const _ = require('lodash');
1 2
 const exec = require('shell-utils').exec;
3
+
4
+const release = _.includes(process.argv, 'release');
5
+
2 6
 run();
3 7
 
4 8
 function run() {
5
-  exec.execSync(`cd lib/android && ./gradlew ${process.env.CI ? 'clean' : ''} unitTest`);
9
+  exec.execSync(`cd lib/android && ./gradlew ${release ? 'testReleaseUnitTest' : 'testDebugUnitTest'}`);
6 10
 }

+ 2
- 2
scripts/travis.sh View File

@@ -21,8 +21,8 @@ run_f () {
21 21
 
22 22
 run_f "yarn install"
23 23
 run_f "yarn run test-js"
24
-run_f "yarn run test-unit-android"
24
+run_f "yarn run test-unit-android -- release"
25 25
 run_f "yarn run test-unit-ios -- release"
26
-run_f "yarn run test-e2e-android"
26
+run_f "yarn run test-e2e-android -- release"
27 27
 run_f "yarn run test-e2e-ios -- release"
28 28
 run_f "yarn run release"