GitLiveApp / firebase-kotlin-sdk

A Kotlin-first SDK for Firebase
https://gitliveapp.github.io/firebase-kotlin-sdk/
Apache License 2.0
1.11k stars 153 forks source link

Run android emulator on ubuntu build agent #524

Closed siarhei-luskanau closed 3 months ago

nbransby commented 3 months ago

@siarhei-luskanau were you hoping this might fix the fakey android tests?

Reedyuk commented 3 months ago

Seems to be failing, could you fix it and get it passing. Happy to merge once it passes

siarhei-luskanau commented 3 months ago

@siarhei-luskanau were you hoping this might fix the fakey android tests?

I will try to fix the android tests. Additional I would like to add the gradle-managed-devices to project and use it instead of reactivecircus/android-emulator-runner GitHub action task

Reedyuk commented 3 months ago

ok that makes sense. Use this pr to do those changes and get the tests passing and i will review and get it merged in

nbransby commented 3 months ago

Execution failed for task ':firebase-app:gradleManagedDeviceSetup'.

A failure occurred while executing com.android.build.gradle.internal.tasks.ManagedDeviceInstrumentationTestSetupTask$ManagedDeviceSetupRunnable java.util.concurrent.ExecutionException: com.android.builder.sdk.LicenceNotAcceptedException: Failed to install the following Android SDK packages as some licences have not been accepted. system-images;android-33;google_atd;x86_64 Google APIs ATD Intel x86_64 Atom System Image To build this project, accept the SDK license agreements and install the missing components using the Android Studio SDK Manager. All licenses can be accepted using the sdkmanager command line tool: sdkmanager.bat --licenses Or, to transfer the license agreements from one workstation to another, see https://developer.android.com/studio/intro/update.html#download-with-gradle

 Using Android SDK: /usr/local/lib/android/sdk
siarhei-luskanau commented 3 months ago

@Reedyuk @nbransby I managed to split the android tests by modules. Now GitHub Actions launch the build agent for each Gradle module with android tests. I still in progress with replacing the reactivecircus/android-emulator-runner with the gradle-managed-devices

Reedyuk commented 3 months ago

@Reedyuk @nbransby I managed to split the android tests by modules. Now GitHub Actions launch the build agent for each Gradle module with android tests. I still in progress with replacing the reactivecircus/android-emulator-runner with the gradle-managed-devices

Really nice work, thanks for the contribution. What is the impact on merging this in now? you can add a new pr for the other change?

Reedyuk commented 3 months ago

Ah crashlytics is failing

siarhei-luskanau commented 3 months ago

Ah crashlytics is failing

Right! Crashlytics is failing. Benefit on that PR is splitting tests by module. So other modules is tested successfully.

siarhei-luskanau commented 3 months ago

What is the impact on merging this in now? you can add a new pr for the other change?

This PR contains unused and uncompleted code related he gradle-managed-devices. I will continue this in other PR

Reedyuk commented 3 months ago

Ah crashlytics is failing

Right! Crashlytics is failing. Benefit on that PR is splitting tests by module. So other modules is tested successfully.

Get a green tick on all and happy to merge this in.

siarhei-luskanau commented 3 months ago

@Reedyuk I have applied the gradle-managed-devices with api 33 instead of 34. Right now I see emulator failing with api 34

siarhei-luskanau commented 3 months ago

@Reedyuk I have added the devRunEmulatorTests Gradle task for developers to launch Android tests locally

Reedyuk commented 3 months ago

Thank you for your hard work @siarhei-luskanau