Daniel Zlotin 7 лет назад
Родитель
Сommit
a71a4aa327
4 измененных файлов: 16 добавлений и 12 удалений
  1. 6
    0
      .travis.yml
  2. 2
    2
      scripts/env/installAndroidSDK.sh
  3. 4
    6
      scripts/test.e2e.android.js
  4. 4
    4
      scripts/travis.sh

+ 6
- 0
.travis.yml Просмотреть файл

@@ -13,10 +13,16 @@ branches:
13 13
   - master
14 14
   - v2
15 15
 
16
+before_cache:
17
+  - rm -f  $HOME/.gradle/caches/modules-2/modules-2.lock
18
+  - rm -fr $HOME/.gradle/caches/*/plugin-resolution/
16 19
 cache:
17 20
   directories:
18 21
     - $YARN_CACHE
19 22
     - $HOME/.m2
23
+    - $HOME/.gradle/caches/
24
+    - $HOME/.gradle/wrapper/
25
+    - $HOME/.android/build-cache
20 26
 
21 27
 install:
22 28
         # node:

+ 2
- 2
scripts/env/installAndroidSDK.sh Просмотреть файл

@@ -18,12 +18,12 @@ echo "Copying Android Licenses"
18 18
 mkdir -p "${ANDROID_HOME}"/licenses
19 19
 cp "$scriptdir/android-sdk-licenses/"* "${ANDROID_HOME}"/licenses
20 20
 
21
-package="system-images;android-24;default;x86"
21
+package="system-images;android-24;default;armeabi_v7a"
22 22
 echo "Downloading emulator"
23 23
 sdkmanager "emulator"
24 24
 echo "Downloading $package"
25 25
 sdkmanager "${package}"
26 26
 echo "Creating avd"
27
-echo no | avdmanager create avd --force --name "pixel" --abi "default/x86" --package "${package}" --device "pixel"
27
+echo no | avdmanager create avd --force --name "pixel" --abi "default/armeabi_v7a" --package "${package}" --device "pixel"
28 28
 sleep 2
29 29
 avdmanager list avd

+ 4
- 6
scripts/test.e2e.android.js Просмотреть файл

@@ -9,7 +9,6 @@ run();
9 9
 function run() {
10 10
   if (process.env.CI) {
11 11
     try {
12
-      // console.log(`android e2e disabled on CI for now`);
13 12
       launchEmulator();
14 13
       runTests();
15 14
     } finally {
@@ -21,15 +20,14 @@ function run() {
21 20
 }
22 21
 
23 22
 function runTests() {
24
-  console.log('all OK');
25
-  // exec.execSync(`yarn run uninstall-android`);
26
-  // exec.execSync(`yarn run install-android ${release ? '-- release' : ''}`);
27
-  // exec.execSync(`cd AndroidE2E && ./gradlew connectedDebugAndroidTest`);
23
+  exec.execSync(`yarn run uninstall-android`);
24
+  exec.execSync(`yarn run install-android ${release ? '-- release' : ''}`);
25
+  exec.execSync(`cd AndroidE2E && ./gradlew connectedDebugAndroidTest`);
28 26
 }
29 27
 
30 28
 function launchEmulator() {
31 29
   console.log(`Launching Android Emulator`);
32
-  exec.execSync(`cd $ANDROID_HOME/tools && ./emulator -skin 1080x1920 -gpu host -no-audio @pixel`);
30
+  exec.execSync(`cd $ANDROID_HOME/tools && ./emulator -skin 1080x1920 -no-audio @pixel`);
33 31
   exec.execSync(`./scripts/waitForAndroidEmulator.sh`);
34 32
 }
35 33
 

+ 4
- 4
scripts/travis.sh Просмотреть файл

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