mirror of
https://github.com/reactivecircus/android-emulator-runner.git
synced 2026-08-31 17:49:33 +00:00
Update the README and fix some typos (#199)
* Updated the readme with the additional targets and fixed some typos * fix spacing with macos-11 * fix more typos
This commit is contained in:
committed by
GitHub
parent
cc46524d3f
commit
d15e7110de
@@ -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). |
|
||||
|
||||
+1
-1
@@ -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
|
||||
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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<void> {
|
||||
try {
|
||||
@@ -100,7 +100,7 @@ async function waitForDevice(): Promise<void> {
|
||||
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<void> {
|
||||
console.warn(error.message);
|
||||
}
|
||||
|
||||
if (attempts < maxAttemps) {
|
||||
if (attempts < maxAttempts) {
|
||||
await delay(retryInterval * 1000);
|
||||
} else {
|
||||
throw new Error(`Timeout waiting for emulator to boot.`);
|
||||
|
||||
Reference in New Issue
Block a user