Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pre Emulator Launch Script #247

Merged

Conversation

nilsreichardt
Copy link
Contributor

@nilsreichardt nilsreichardt commented Apr 27, 2022

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

@nilsreichardt nilsreichardt marked this pull request as draft April 27, 2022 14:54
@nilsreichardt nilsreichardt changed the title WIP: Pre Emulator Launch Script Pre Emulator Launch Script Apr 27, 2022
@mrk-han
Copy link
Collaborator

mrk-han commented Oct 12, 2022

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.

@mrk-han
Copy link
Collaborator

mrk-han commented Oct 19, 2022

@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?

@ychescale9
Copy link
Member

Sorry for the late response, I'll take a look at the PR this weekend.

README.md Outdated Show resolved Hide resolved
Co-authored-by: Yang <[email protected]>
@mrk-han
Copy link
Collaborator

mrk-han commented Oct 26, 2022

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

@nilsreichardt
Copy link
Contributor Author

Just need to address this failed check

Is fixed :)

@mrk-han
Copy link
Collaborator

mrk-han commented Oct 26, 2022

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

@ychescale9 ychescale9 merged commit 411cd10 into ReactiveCircus:main Oct 26, 2022
@ychescale9
Copy link
Member

Thanks!

ychescale9 added a commit that referenced this pull request Oct 28, 2022
* main:
  Prepare for release 2.27.0.
  Clean up action description.
  Update dependencies (#282)
  Update Readme & Provide current context on Hardware Acceleration on Github (#279)
  Pre Emulator Launch Script (#247)
  Update to Node 16 (#276)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

How to run a script before launching the emulator?
3 participants