android-emulator-runner
android-emulator-runner copied to clipboard
Pre Emulator Launch Script
Description
I added a new parameter pre-emulator-launcher-script (if you have better names, please let me know). With this parameter, you can pass a custom script which will be executed before launching the emulator (see #246 for more context).
Tests
I haven't written any unit tests, but added the pre-emulator-launcher-script to the CI of 1 job, so that we have 1 job with the parameter and 1 without the parameter. You can see here the ouput: https://github.com/nilsreichardt/android-emulator-runner/runs/6196378411?check_suite_focus=true#step:9:97
Related Tickets
Closes #246
Would this same behavior be possible by separating the command to create the emulator, and the command to run the tests with a run: step?
Also, this seems less efficient than making a post-create-avd script to edit the config after the AVD is created. If you do this once, post-create, then you won't need to run it again if the emulator is cached. Post-create script would be able to be run in a emulator caching step. With this solution, you would need to run it every time, even if the emulator is cached.
@nilsreichardt I suppose I do see the benefit of being able to call a script if using one instance of this action in your .yml
@ychescale9 Can we merge this in?
Sorry for the late response, I'll take a look at the PR this weekend.
Exception in thread "main" java.lang.IllegalStateException: The same set of inputs should exist in action manifest and types manifest!
[4](https://github.com/ReactiveCircus/android-emulator-runner/actions/runs/3302783629/jobs/5450189503#step:4:5)
at it.krzeminski.githubactionstyping.ManifestsToReportKt.manifestsToReport(ManifestsToReport.kt:22)
[5](https://github.com/ReactiveCircus/android-emulator-runner/actions/runs/3302783629/jobs/5450189503#step:4:6)
at it.krzeminski.githubactionstyping.MainKt.main(Main.kt:19)
[6](https://github.com/ReactiveCircus/android-emulator-runner/actions/runs/3302783629/jobs/5450189503#step:4:7)
at it.krzeminski.githubactionstyping.MainKt.main(Main.kt)
Just need to address this failed check
Just need to address this failed check
Is fixed :)
Some of these emulators have been so flakey lately when booting, and I don't think we have a way of rerunning failed runs unless @ychescale9 kicks them off. I'm trying to address it in my PR with a mechanism to comment "run tests" on a PR.
Failed job: https://github.com/ReactiveCircus/android-emulator-runner/actions/runs/3328847468/jobs/5506688370
Thanks!