Compare commits
1 Commits
e4cd25a347
...
aa385b00a9
Author | SHA1 | Date | |
---|---|---|---|
aa385b00a9 |
@ -35,9 +35,6 @@ jobs:
|
|||||||
pkill -SIGTERM crashpad_handler || true
|
pkill -SIGTERM crashpad_handler || true
|
||||||
sleep 5
|
sleep 5
|
||||||
pkill -SIGKILL crashpad_handler || true
|
pkill -SIGKILL crashpad_handler || true
|
||||||
- name: Change url until I find a better way to do it
|
|
||||||
run: |
|
|
||||||
sed -i "s/val defaultUrl = \"http:\/\/10\.0\.2\.2\:8888\"/val defaultUrl = \"http:\/\/172\.17\.0\.1\:8888\"/g" ./androidApp/src/androidTest/kotlin/bou/amine/apps/readerforselfossv2/android/CommonTests.kt
|
|
||||||
- name: Tests
|
- name: Tests
|
||||||
uses: reactivecircus/android-emulator-runner@v2
|
uses: reactivecircus/android-emulator-runner@v2
|
||||||
with:
|
with:
|
||||||
@ -46,9 +43,9 @@ jobs:
|
|||||||
./gradlew androidApp:clearScreenshotsTask || true
|
./gradlew androidApp:clearScreenshotsTask || true
|
||||||
./gradlew androidApp:createScreenshotDirectory
|
./gradlew androidApp:createScreenshotDirectory
|
||||||
adb logcat -G 16M
|
adb logcat -G 16M
|
||||||
./gradlew JacocoDebugCodeCoverage || true
|
env SELFOSS_URL=172.17.0.1:8888 ./gradlew JacocoDebugCodeCoverage || true
|
||||||
./gradlew androidApp:fetchScreenshots
|
./gradlew androidApp:fetchScreenshots
|
||||||
adb logcat 'audio_hw_generic:S' '*:I' -d > ./androidApp/build/reports/androidTests/connected/screenshots/logs.txt
|
adb logcat '*:I' -d > ./androidApp/build/reports/androidTests/connected/screenshots/logs.txt
|
||||||
- uses: actions/upload-artifact@v3
|
- uses: actions/upload-artifact@v3
|
||||||
if: always()
|
if: always()
|
||||||
with:
|
with:
|
||||||
|
@ -272,12 +272,6 @@ tasks.withType<Test> {
|
|||||||
)
|
)
|
||||||
showStandardStreams = true
|
showStandardStreams = true
|
||||||
}
|
}
|
||||||
if (this.name == "connectedAndroidTest") {
|
|
||||||
configure<JacocoTaskExtension> {
|
|
||||||
isIncludeNoLocationClasses = true
|
|
||||||
excludes = listOf("jdk.internal.*")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
aboutLibraries {
|
aboutLibraries {
|
||||||
@ -317,3 +311,12 @@ tasks.register<Exec>("fetchScreenshots") {
|
|||||||
reportsDirectory.mkdirs()
|
reportsDirectory.mkdirs()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
tasks.withType(Test::class) {
|
||||||
|
if (this.name == "connectedAndroidTest") {
|
||||||
|
configure<JacocoTaskExtension> {
|
||||||
|
isIncludeNoLocationClasses = true
|
||||||
|
excludes = listOf("jdk.internal.*")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@ -32,8 +32,7 @@ import java.io.FileOutputStream
|
|||||||
import java.io.IOException
|
import java.io.IOException
|
||||||
import java.util.Locale
|
import java.util.Locale
|
||||||
|
|
||||||
// For now, do not move this as it is modified by the integration tests
|
val defaultUrl = (System.getenv("SELFOSS_URL") ?: "").ifEmpty { "http://10.0.2.2:8888" }
|
||||||
val defaultUrl = "http://10.0.2.2:8888"
|
|
||||||
|
|
||||||
fun performLogin(someUrl: String? = null) {
|
fun performLogin(someUrl: String? = null) {
|
||||||
Log.i("AUTOMATION", "The url used will be ${if (!someUrl.isNullOrEmpty()) someUrl else defaultUrl}")
|
Log.i("AUTOMATION", "The url used will be ${if (!someUrl.isNullOrEmpty()) someUrl else defaultUrl}")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user