mirror of
https://github.com/kiwix/kiwix-android.git
synced 2025-09-12 17:08:59 -04:00
Merge pull request #2133 from kiwix/macgills/feature/2131-broken-instrumentation
#2131 PR instrumentation tests can fail silently
This commit is contained in:
commit
3f90d9bd5c
11
.github/workflows/nightly.yml
vendored
11
.github/workflows/nightly.yml
vendored
@ -21,11 +21,18 @@ jobs:
|
|||||||
fetch-depth: 1
|
fetch-depth: 1
|
||||||
|
|
||||||
- name: run instrumentation tests
|
- name: run instrumentation tests
|
||||||
uses: reactivecircus/android-emulator-runner@v2.0.0
|
uses: ReactiveCircus/android-emulator-runner@v2.8.0
|
||||||
with:
|
with:
|
||||||
api-level: ${{ matrix.api-level }}
|
api-level: ${{ matrix.api-level }}
|
||||||
arch: x86_64
|
arch: x86_64
|
||||||
script: ./gradlew connectedDebugAndroidTest
|
script: bash contrib/instrumentation_nightly.sh
|
||||||
|
|
||||||
|
- name: Upload screenshot result
|
||||||
|
uses: actions/upload-artifact@v1
|
||||||
|
if: failure()
|
||||||
|
with:
|
||||||
|
name: ${{ matrix.api-level }}
|
||||||
|
path: screencap.png
|
||||||
|
|
||||||
unit_test_and_release:
|
unit_test_and_release:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
@ -2,6 +2,9 @@
|
|||||||
|
|
||||||
adb logcat -c
|
adb logcat -c
|
||||||
adb logcat *:E -v color &
|
adb logcat *:E -v color &
|
||||||
./gradlew jacocoInstrumentationTestReport
|
if ./gradlew jacocoInstrumentationTestReport; then
|
||||||
|
echo "jacocoInstrumentationTestReport succeeded" >&2
|
||||||
|
else
|
||||||
adb exec-out screencap -p >screencap.png
|
adb exec-out screencap -p >screencap.png
|
||||||
find screencap.png
|
echo "jacocoInstrumentationTestReport failed" >&2
|
||||||
|
fi
|
||||||
|
10
contrib/instrumentation_nightly.sh
Normal file
10
contrib/instrumentation_nightly.sh
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
adb logcat -c
|
||||||
|
adb logcat *:E -v color &
|
||||||
|
if ./gradlew connectedDebugAndroidTest; then
|
||||||
|
echo "connectedDebugAndroidTest succeeded" >&2
|
||||||
|
else
|
||||||
|
adb exec-out screencap -p >screencap.png
|
||||||
|
echo "connectedDebugAndroidTest failed" >&2
|
||||||
|
fi
|
Loading…
x
Reference in New Issue
Block a user