mirror of
https://github.com/kiwix/kiwix-android.git
synced 2025-09-23 04:33:54 -04:00
Merge pull request #1282 from kiwix/feature/macgills/fail-fast-instrumentation
Move Instrumentation first and use TestOrchestrator to minimise memor…
This commit is contained in:
commit
7c24a0e803
11
.travis.yml
11
.travis.yml
@ -49,25 +49,24 @@ android:
|
|||||||
licenses:
|
licenses:
|
||||||
- ".+"
|
- ".+"
|
||||||
|
|
||||||
script:
|
before_script:
|
||||||
- ./gradlew assemble lintKiwixDebug jacocoTestKiwixDebugUnitTestReport
|
|
||||||
- echo no | android create avd --force -n test -t $ANDROID_TARGET --abi $ANDROID_ABI -c 100M
|
- echo no | android create avd --force -n test -t $ANDROID_TARGET --abi $ANDROID_ABI -c 100M
|
||||||
- emulator -avd test -no-audio -no-window &
|
- emulator -avd test -no-audio -no-window &
|
||||||
- android-wait-for-emulator
|
- android-wait-for-emulator
|
||||||
- adb shell input keyevent 82 &
|
- adb shell input keyevent 82 &
|
||||||
- adb -e logcat *:D > logcat.log &
|
|
||||||
- ./gradlew createKiwixDebugCoverageReport
|
script:
|
||||||
|
- ./gradlew createKiwixDebugCoverageReport lintKiwixDebug jacocoTestKiwixDebugUnitTestReport assemble
|
||||||
|
|
||||||
after_success:
|
after_success:
|
||||||
- bash <(curl -s https://codecov.io/bash)
|
- bash <(curl -s https://codecov.io/bash)
|
||||||
- ./gradlew kiwixtestUploadKiwix assembleKiwixRelease
|
- ./gradlew kiwixtestUploadKiwix
|
||||||
|
|
||||||
after_failure:
|
after_failure:
|
||||||
- export LOG_DIR = ${TRAVIS_HOME}/build/kiwix/kiwix-android/app/build/outputs/reports/androidTests/connected/flavors/KIWIX/
|
- export LOG_DIR = ${TRAVIS_HOME}/build/kiwix/kiwix-android/app/build/outputs/reports/androidTests/connected/flavors/KIWIX/
|
||||||
- lynx --dump ${LOG_DIR}com.android.builder.testing.ConnectedDevice.html
|
- lynx --dump ${LOG_DIR}com.android.builder.testing.ConnectedDevice.html
|
||||||
- lynx --dump ${LOG_DIR}com.android.builder.testing.html
|
- lynx --dump ${LOG_DIR}com.android.builder.testing.html
|
||||||
- lynx --dump ${LOG_DIR}org.kiwix.kiwixmobile.tests.BasicTest.html;
|
- lynx --dump ${LOG_DIR}org.kiwix.kiwixmobile.tests.BasicTest.html;
|
||||||
- echo " LOGCAT "; echo "========"; cat logcat.log; pkill -KILL -f adb
|
|
||||||
|
|
||||||
before_deploy:
|
before_deploy:
|
||||||
# - export APP_CHANGELOG=$(cat app/src/kiwix/play/release-notes/en-US/default.txt)
|
# - export APP_CHANGELOG=$(cat app/src/kiwix/play/release-notes/en-US/default.txt)
|
||||||
|
@ -83,6 +83,7 @@ dependencies {
|
|||||||
androidTestImplementation "androidx.test:rules:1.2.0"
|
androidTestImplementation "androidx.test:rules:1.2.0"
|
||||||
androidTestImplementation "androidx.test:core:1.2.0"
|
androidTestImplementation "androidx.test:core:1.2.0"
|
||||||
androidTestImplementation "com.squareup.okhttp3:mockwebserver:3.6.0"
|
androidTestImplementation "com.squareup.okhttp3:mockwebserver:3.6.0"
|
||||||
|
androidTestUtil 'androidx.test:orchestrator:1.1.0'
|
||||||
// Mockito
|
// Mockito
|
||||||
androidTestImplementation "org.mockito:mockito-android:$mockitoVersion"
|
androidTestImplementation "org.mockito:mockito-android:$mockitoVersion"
|
||||||
|
|
||||||
@ -235,6 +236,7 @@ android {
|
|||||||
}
|
}
|
||||||
|
|
||||||
testOptions {
|
testOptions {
|
||||||
|
execution 'ANDROIDX_TEST_ORCHESTRATOR'
|
||||||
unitTests.returnDefaultValues = true
|
unitTests.returnDefaultValues = true
|
||||||
unitTests.all {
|
unitTests.all {
|
||||||
useJUnitPlatform()
|
useJUnitPlatform()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user