Compare commits

..

1 Commits

Author SHA1 Message Date
37cd7d5d8c ci: Instrumentation tests coverage in ci.
Some checks failed
Check PR code / BuildAndTestAndCoverage (pull_request) Failing after 49m44s
2025-03-20 17:27:54 +01:00
3 changed files with 15 additions and 28 deletions

View File

@ -45,6 +45,7 @@ jobs:
script: | script: |
./gradlew androidApp:connectedAndroidTest ./gradlew androidApp:connectedAndroidTest
killall -INT crashpad_handler || true killall -INT crashpad_handler || true
./gradlew androidApp:fetchScreenshots
- uses: actions/upload-artifact@v3 - uses: actions/upload-artifact@v3
if: failure() if: failure()
with: with:

View File

@ -261,30 +261,16 @@ val createScreenshotDirectoryTask =
commandLine = listOf("adb", "shell", "mkdir", "-p", "/sdcard/Pictures/selfoss_tests") commandLine = listOf("adb", "shell", "mkdir", "-p", "/sdcard/Pictures/selfoss_tests")
} }
val fetchScreenshotsTask = tasks.register<Exec>("fetchScreenshots") {
tasks.register<Exec>("fetchScreenshots") { println("AMINE : fetch")
println("AMINE : fetch") group = "reporting"
group = "reporting" executable(android.adbExecutable.toString())
executable(android.adbExecutable.toString()) commandLine = listOf("adb", "pull", "/sdcard/Pictures/selfoss_tests/.", reportsDirectory.toString())
commandLine = listOf("adb", "pull", "/sdcard/Pictures/selfoss_tests/.", reportsDirectory.toString())
finalizedBy(clearScreenshotsTask) finalizedBy(clearScreenshotsTask)
dependsOn(createScreenshotDirectoryTask) dependsOn(createScreenshotDirectoryTask)
doFirst { doFirst {
reportsDirectory.mkdirs() reportsDirectory.mkdirs()
}
} }
tasks.whenTaskAdded {
if (this.name == "connectedGithubConfigDebugAndroidTest") {
this.finalizedBy(fetchScreenshotsTask)
}
/* if (this.name == "mergeGithubConfigDebugResources" ||
this.name == "packageGithubConfigDebugResources" ||
this.name == "mapGithubConfigDebugSourceSetPaths" ||
this.name == "extractDeepLinksGithubConfigDebug"
) {
this.dependsOn("prepareLibraryDefinitionsGithubConfigDebug")
}*/
} }

View File

@ -93,9 +93,9 @@ class SettingsActivityTest : WithANRException() {
onView(withText(R.string.translation)).check(matches(isDisplayed())) onView(withText(R.string.translation)).check(matches(isDisplayed()))
} }
/* @Test @Test
fun testAbout() { fun testAbout() {
onView(withText(R.string.action_about)).perform(click()) onView(withText(R.string.action_about)).perform(click())
onView(withText("ACRA")).check(matches(isDisplayed())) onView(withText("ACRA")).check(matches(isDisplayed()))
}*/ }
} }