mirror of
https://github.com/reactivecircus/android-emulator-runner.git
synced 2026-08-31 17:49:33 +00:00
Add support for providing any emulator launch options as action input. Remove headless input which might overlap with emulator-options.
This commit is contained in:
+8
-10
@@ -43,11 +43,9 @@ function run() {
|
||||
// Hardware profile used for creating the AVD
|
||||
const profile = core.getInput('profile');
|
||||
console.log(`Hardware profile: ${profile}`);
|
||||
// headless mode
|
||||
const headlessInput = core.getInput('headless');
|
||||
input_validator_1.checkHeadless(headlessInput);
|
||||
const headless = headlessInput === 'true';
|
||||
console.log(`headless mode: ${headless}`);
|
||||
// emulator options
|
||||
const emulatorOptions = core.getInput('emulator-options').trim();
|
||||
console.log(`emulator options: ${emulatorOptions}`);
|
||||
// disable animations
|
||||
const disableAnimationsInput = core.getInput('disable-animations');
|
||||
input_validator_1.checkDisableAnimations(disableAnimationsInput);
|
||||
@@ -55,12 +53,12 @@ function run() {
|
||||
console.log(`disable animations: ${disableAnimations}`);
|
||||
// custom scrpt to run
|
||||
const script = core.getInput('script', { required: true });
|
||||
// install SDK
|
||||
yield sdk_installer_1.installAndroidSdk(apiLevel, target, arch);
|
||||
// launch an emulator
|
||||
yield emulator_manager_1.launchEmulator(apiLevel, target, arch, profile, headless, disableAnimations);
|
||||
// execute the custom script
|
||||
try {
|
||||
// install SDK
|
||||
yield sdk_installer_1.installAndroidSdk(apiLevel, target, arch);
|
||||
// launch an emulator
|
||||
yield emulator_manager_1.launchEmulator(apiLevel, target, arch, profile, emulatorOptions, disableAnimations);
|
||||
// execute the custom script
|
||||
yield exec.exec(`${script}`);
|
||||
}
|
||||
catch (error) {
|
||||
|
||||
Reference in New Issue
Block a user