diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index 277809a58f..0a12587e84 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -104,11 +104,20 @@ jobs: force-avd-creation: false emulator-options: -no-snapshot-save -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none emulator-build: 7425822 - script: ./gradlew $CI_GRADLE_ARG_PROPERTIES -Pandroid.testInstrumentationRunnerArguments.package='org.matrix.android.sdk.session' matrix-sdk-android:connectedDebugAndroidTest + script: | + adb root + adb logcat -c + touch emulator-session.log + chmod 777 emulator-session.log + adb logcat >> emulator-session.log & + ./gradlew $CI_GRADLE_ARG_PROPERTIES -Pandroid.testInstrumentationRunnerArguments.package='org.matrix.android.sdk.session' matrix-sdk-android:connectedDebugAndroidTest - name: Read Results [org.matrix.android.sdk.session] if: always() id: get-comment-body-session run: python3 ./tools/ci/render_test_output.py session ./matrix-sdk-android/build/outputs/androidTest-results/connected/*.xml + - name: Remove adb logcat + if: always() + run: pkill -9 adb - name: Run integration tests for Matrix SDK [org.matrix.android.sdk.account] API[${{ matrix.api-level }}] if: always() uses: reactivecircus/android-emulator-runner@v2 @@ -119,11 +128,20 @@ jobs: force-avd-creation: false emulator-options: -no-snapshot-save -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none emulator-build: 7425822 - script: ./gradlew $CI_GRADLE_ARG_PROPERTIES -Pandroid.testInstrumentationRunnerArguments.package='org.matrix.android.sdk.account' matrix-sdk-android:connectedDebugAndroidTest + script: | + adb root + adb logcat -c + touch emulator-account.log + chmod 777 emulator-account.log + adb logcat >> emulator-account.log & + ./gradlew $CI_GRADLE_ARG_PROPERTIES -Pandroid.testInstrumentationRunnerArguments.package='org.matrix.android.sdk.account' matrix-sdk-android:connectedDebugAndroidTest - name: Read Results [org.matrix.android.sdk.account] if: always() id: get-comment-body-account run: python3 ./tools/ci/render_test_output.py account ./matrix-sdk-android/build/outputs/androidTest-results/connected/*.xml + - name: Remove adb logcat + if: always() + run: pkill -9 adb # package: org.matrix.android.sdk.internal - name: Run integration tests for Matrix SDK [org.matrix.android.sdk.internal] API[${{ matrix.api-level }}] if: always() @@ -135,11 +153,20 @@ jobs: force-avd-creation: false emulator-options: -no-snapshot-save -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none emulator-build: 7425822 - script: ./gradlew $CI_GRADLE_ARG_PROPERTIES -Pandroid.testInstrumentationRunnerArguments.package='org.matrix.android.sdk.internal' matrix-sdk-android:connectedDebugAndroidTest + script: | + adb root + adb logcat -c + touch emulator-internal.log + chmod 777 emulator-internal.log + adb logcat >> emulator-internal.log & + ./gradlew $CI_GRADLE_ARG_PROPERTIES -Pandroid.testInstrumentationRunnerArguments.package='org.matrix.android.sdk.internal' matrix-sdk-android:connectedDebugAndroidTest - name: Read Results [org.matrix.android.sdk.internal] if: always() id: get-comment-body-internal run: python3 ./tools/ci/render_test_output.py internal ./matrix-sdk-android/build/outputs/androidTest-results/connected/*.xml + - name: Remove adb logcat + if: always() + run: pkill -9 adb # package: org.matrix.android.sdk.ordering - name: Run integration tests for Matrix SDK [org.matrix.android.sdk.ordering] API[${{ matrix.api-level }}] if: always() @@ -151,11 +178,20 @@ jobs: force-avd-creation: false emulator-options: -no-snapshot-save -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none emulator-build: 7425822 - script: ./gradlew $CI_GRADLE_ARG_PROPERTIES -Pandroid.testInstrumentationRunnerArguments.package='org.matrix.android.sdk.ordering' matrix-sdk-android:connectedDebugAndroidTest + script: | + adb root + adb logcat -c + touch emulator-ordering.log + chmod 777 emulator-ordering.log + adb logcat >> emulator-ordering.log & + ./gradlew $CI_GRADLE_ARG_PROPERTIES -Pandroid.testInstrumentationRunnerArguments.package='org.matrix.android.sdk.ordering' matrix-sdk-android:connectedDebugAndroidTest - name: Read Results [org.matrix.android.sdk.ordering] if: always() id: get-comment-body-ordering run: python3 ./tools/ci/render_test_output.py ordering ./matrix-sdk-android/build/outputs/androidTest-results/connected/*.xml + - name: Remove adb logcat + if: always() + run: pkill -9 adb # package: class PermalinkParserTest - name: Run integration tests for Matrix SDK class [org.matrix.android.sdk.PermalinkParserTest] API[${{ matrix.api-level }}] if: always() @@ -167,11 +203,20 @@ jobs: force-avd-creation: false emulator-options: -no-snapshot-save -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none emulator-build: 7425822 - script: ./gradlew $CI_GRADLE_ARG_PROPERTIES -Pandroid.testInstrumentationRunnerArguments.class='org.matrix.android.sdk.PermalinkParserTest' matrix-sdk-android:connectedDebugAndroidTest + script: | + adb root + adb logcat -c + touch emulator-permalink.log + chmod 777 emulator-permalink.log + adb logcat >> emulator-permalink.log & + ./gradlew $CI_GRADLE_ARG_PROPERTIES -Pandroid.testInstrumentationRunnerArguments.class='org.matrix.android.sdk.PermalinkParserTest' matrix-sdk-android:connectedDebugAndroidTest - name: Read Results [org.matrix.android.sdk.PermalinkParserTest] if: always() id: get-comment-body-permalink run: python3 ./tools/ci/render_test_output.py permalink ./matrix-sdk-android/build/outputs/androidTest-results/connected/*.xml + - name: Remove adb logcat + if: always() + run: pkill -9 adb # package: class PermalinkParserTest - name: Find Comment if: always() && github.event_name == 'pull_request' @@ -196,6 +241,17 @@ jobs: - `[org.matrix.android.sdk.ordering]`
${{ steps.get-comment-body-ordering.outputs.ordering }} - `[org.matrix.android.sdk.PermalinkParserTest]`
${{ steps.get-comment-body-permalink.outputs.permalink }} edit-mode: replace + - name: Upload Test Report Log + uses: actions/upload-artifact@v2 + if: always() + with: + name: integrationtest-error-results + path: | + emulator-permalink.log + emulator-internal.log + emulator-ordering.log + emulator-account.log + emulator-session.log ui-tests: name: UI Tests (Synapse) @@ -250,7 +306,7 @@ jobs: uses: actions/upload-artifact@v2 if: always() with: - name: sanity-error-results + name: uitest-error-results path: | emulator.log failure_screenshots/ @@ -270,4 +326,4 @@ jobs: matrix_access_token: ${{ secrets.ELEMENT_ANDROID_NOTIFICATION_ACCESS_TOKEN }} matrix_room_id: ${{ secrets.ELEMENT_ANDROID_INTERNAL_ROOM_ID }} text_template: "Nightly test run: {{#each job_statuses }}{{#with this }}{{#if completed }} {{name}} {{conclusion}} at {{completed_at}}, {{/if}}{{/with}}{{/each}}" - html_template: "Nightly test run results: {{#each job_statuses }}{{#with this }}{{#if completed }}
{{name}} {{conclusion}} at {{completed_at}} [details]{{/if}}{{/with}}{{/each}}" \ No newline at end of file + html_template: "Nightly test run results: {{#each job_statuses }}{{#with this }}{{#if completed }}
{{name}} {{conclusion}} at {{completed_at}} [details]{{/if}}{{/with}}{{/each}}"