Compare commits
1 Commits
aa385b00a9
...
e4cd25a347
Author | SHA1 | Date | |
---|---|---|---|
e4cd25a347 |
@ -35,6 +35,9 @@ 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:
|
||||||
@ -43,9 +46,9 @@ jobs:
|
|||||||
./gradlew androidApp:clearScreenshotsTask || true
|
./gradlew androidApp:clearScreenshotsTask || true
|
||||||
./gradlew androidApp:createScreenshotDirectory
|
./gradlew androidApp:createScreenshotDirectory
|
||||||
adb logcat -G 16M
|
adb logcat -G 16M
|
||||||
env SELFOSS_URL=172.17.0.1:8888 ./gradlew JacocoDebugCodeCoverage || true
|
./gradlew JacocoDebugCodeCoverage || true
|
||||||
./gradlew androidApp:fetchScreenshots
|
./gradlew androidApp:fetchScreenshots
|
||||||
adb logcat '*:I' -d > ./androidApp/build/reports/androidTests/connected/screenshots/logs.txt
|
adb logcat 'audio_hw_generic:S' '*: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,6 +272,12 @@ tasks.withType<Test> {
|
|||||||
)
|
)
|
||||||
showStandardStreams = true
|
showStandardStreams = true
|
||||||
}
|
}
|
||||||
|
if (this.name == "connectedAndroidTest") {
|
||||||
|
configure<JacocoTaskExtension> {
|
||||||
|
isIncludeNoLocationClasses = true
|
||||||
|
excludes = listOf("jdk.internal.*")
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
aboutLibraries {
|
aboutLibraries {
|
||||||
@ -311,12 +317,3 @@ 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,7 +32,8 @@ import java.io.FileOutputStream
|
|||||||
import java.io.IOException
|
import java.io.IOException
|
||||||
import java.util.Locale
|
import java.util.Locale
|
||||||
|
|
||||||
val defaultUrl = (System.getenv("SELFOSS_URL") ?: "").ifEmpty { "http://10.0.2.2:8888" }
|
// For now, do not move this as it is modified by the integration tests
|
||||||
|
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