diff --git a/.github/workflows/pull-request-jobs.yml b/.github/workflows/pull-request-jobs.yml index c226468..f6915ca 100644 --- a/.github/workflows/pull-request-jobs.yml +++ b/.github/workflows/pull-request-jobs.yml @@ -130,4 +130,11 @@ jobs: with: name: Emulator-Test-Results-${{ matrix.api-level }} path: ./**/build/testscreenshots/* + retention-days: 1 + - name: Upload Logcat Logs + uses: actions/upload-artifact@v2 + if: always() + with: + name: Emulator-Logcat-Logs-${{ matrix.api-level }} + path: ./**/build/logcat.txt retention-days: 1 \ No newline at end of file diff --git a/gradlescripts/pull-screenshots.gradle b/gradlescripts/pull-screenshots.gradle index 157cde0..ae7f4fe 100644 --- a/gradlescripts/pull-screenshots.gradle +++ b/gradlescripts/pull-screenshots.gradle @@ -98,12 +98,14 @@ task removeLocalScreenshots(type: Delete) { delete files("$savePath") } -task showLogcat(type: Exec) { +task saveLogcatLogs(type: Exec) { group = 'Test-Screenshots' description = 'Show Logcat' - //adb logcat -d - commandLine "$adb", 'logcat', '-d' + doFirst { + standardOutput = new FileOutputStream("${buildDir}/logcat.txt") + } + commandLine "$adb", 'logcat', '-d' } task hasScreenshots(type: Exec) { @@ -111,7 +113,7 @@ task hasScreenshots(type: Exec) { } afterEvaluate { - connectedDebugAndroidTest.finalizedBy showLogcat - showLogcat.finalizedBy pullScreenshots + connectedDebugAndroidTest.finalizedBy saveLogcatLogs + saveLogcatLogs.finalizedBy pullScreenshots clean.dependsOn(removeLocalScreenshots) } \ No newline at end of file