diff --git a/README.md b/README.md index 29161c38..8de39b5b 100644 --- a/README.md +++ b/README.md @@ -22,7 +22,7 @@ This action automates the process by doing the following: ## Usage -It is recommended to run this action on a **macOS** VM, e.g. `macos-latest` or `macos-10.15` to take advantage of hardware accleration support provided by **HAXM**. +It is recommended to run this action on a **macOS** VM, e.g. `macos-latest`, `macos-10.15` or `macos-11` to take advantage of hardware acceleration support provided by **HAXM**. A workflow that uses **android-emulator-runner** to run your instrumented tests on **API 29**: @@ -143,7 +143,7 @@ jobs: | **Input** | **Required** | **Default** | **Description** | |-|-|-|-| | `api-level` | Required | N/A | API level of the platform system image - e.g. 23 for Android Marshmallow, 29 for Android 10. **Minimum API level supported is 15**. | -| `target` | Optional | `default` | Target of the system image - `default`, `google_apis` or `playstore`. | +| `target` | Optional | `default` | Target of the system image - `default`, `google_apis`, `playstore`, `android-wear`, `android-wear-cn`, `android-tv`, `google-tv`, `aosp_atd` or `google_atd`. Note that `aosp_atd` and `google_atd` currently require the following: `api-level: 30`, `arch: x86` or `arch: arm64-v8` and `channel: canary`. | | `arch` | Optional | `x86` | CPU architecture of the system image - `x86`, `x86_64` or `arm64-v8a`. Note that `x86_64` image is only available for API 21+. `arm64-v8a` images require Android 4.2+ and are limited to fewer API levels (e.g. 30). | | `profile` | Optional | N/A | Hardware profile used for creating the AVD - e.g. `Nexus 6`. For a list of all profiles available, run `avdmanager list device`. | | `cores` | Optional | 2 | Number of cores to use for the emulator (`hw.cpu.ncore` in config.ini). | diff --git a/RELEASING.md b/RELEASING.md index 8bc80e27..09eb7b66 100644 --- a/RELEASING.md +++ b/RELEASING.md @@ -1,6 +1,6 @@ # GitHub Action - Android Emulator Runner -Refer to the [recommendeations for versioning and releasing actions](https://github.com/actions/toolkit/blob/master/docs/action-versioning.md#recommendations). +Refer to the [recommendations for versioning and releasing actions](https://github.com/actions/toolkit/blob/master/docs/action-versioning.md#recommendations). ## New major release diff --git a/lib/emulator-manager.js b/lib/emulator-manager.js index 197395e1..8dd880dc 100644 --- a/lib/emulator-manager.js +++ b/lib/emulator-manager.js @@ -89,7 +89,7 @@ function launchEmulator(apiLevel, target, arch, profile, cores, ramSize, sdcardP } exports.launchEmulator = launchEmulator; /** - * Kills the running emulator on the defaut port. + * Kills the running emulator on the default port. */ function killEmulator() { return __awaiter(this, void 0, void 0, function* () { @@ -110,7 +110,7 @@ function waitForDevice() { let booted = false; let attempts = 0; const retryInterval = 2; // retry every 2 seconds - const maxAttemps = EMULATOR_BOOT_TIMEOUT_SECONDS / 2; + const maxAttempts = EMULATOR_BOOT_TIMEOUT_SECONDS / 2; while (!booted) { try { let result = ''; @@ -130,7 +130,7 @@ function waitForDevice() { catch (error) { console.warn(error.message); } - if (attempts < maxAttemps) { + if (attempts < maxAttempts) { yield delay(retryInterval * 1000); } else { diff --git a/src/emulator-manager.ts b/src/emulator-manager.ts index 151bb79f..fe56ee9b 100644 --- a/src/emulator-manager.ts +++ b/src/emulator-manager.ts @@ -83,7 +83,7 @@ export async function launchEmulator( } /** - * Kills the running emulator on the defaut port. + * Kills the running emulator on the default port. */ export async function killEmulator(): Promise { try { @@ -100,7 +100,7 @@ async function waitForDevice(): Promise { let booted = false; let attempts = 0; const retryInterval = 2; // retry every 2 seconds - const maxAttemps = EMULATOR_BOOT_TIMEOUT_SECONDS / 2; + const maxAttempts = EMULATOR_BOOT_TIMEOUT_SECONDS / 2; while (!booted) { try { let result = ''; @@ -120,7 +120,7 @@ async function waitForDevice(): Promise { console.warn(error.message); } - if (attempts < maxAttemps) { + if (attempts < maxAttempts) { await delay(retryInterval * 1000); } else { throw new Error(`Timeout waiting for emulator to boot.`);