mirror of
https://github.com/reactivecircus/android-emulator-runner.git
synced 2026-09-05 19:39:32 +00:00
Add support for API 15-19 system images.
This commit is contained in:
@@ -13,7 +13,7 @@ jobs:
|
|||||||
timeout-minutes: 10
|
timeout-minutes: 10
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
api-level: [21, 23, 29]
|
api-level: [16, 21, 23, 29]
|
||||||
steps:
|
steps:
|
||||||
- name: checkout
|
- name: checkout
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
@@ -37,7 +37,7 @@ jobs:
|
|||||||
uses: ./
|
uses: ./
|
||||||
with:
|
with:
|
||||||
api-level: ${{ matrix.api-level }}
|
api-level: ${{ matrix.api-level }}
|
||||||
target: google_apis
|
target: default
|
||||||
arch: x86
|
arch: x86
|
||||||
profile: Nexus 6
|
profile: Nexus 6
|
||||||
emulator-options: -no-window -gpu swiftshader_indirect -no-snapshot -noaudio -no-boot-anim -camera-back none
|
emulator-options: -no-window -gpu swiftshader_indirect -no-snapshot -noaudio -no-boot-anim -camera-back none
|
||||||
|
|||||||
@@ -69,9 +69,9 @@ jobs:
|
|||||||
|
|
||||||
| | **Required** | **Default** | **Description** |
|
| | **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 21**. |
|
| `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` or `google_apis`. |
|
| `target` | Optional | `default` | Target of the system image - `default` or `google_apis`. |
|
||||||
| `arch` | Optional | `x86` | CPU architecture of the system image - `x86` or `x86_64`. |
|
| `arch` | Optional | `x86` | CPU architecture of the system image - `x86` or `x86_64`. Note that `x86_64` image is only available for API 21+. |
|
||||||
| `profile` | Optional | N/A | Hardware profile used for creating the AVD - e.g. `Nexus 6`. For a list of all profiles available, run `$ANDROID_HOME/tools/bin/avdmanager list` and refer to the results under "Available Android Virtual Devices". |
|
| `profile` | Optional | N/A | Hardware profile used for creating the AVD - e.g. `Nexus 6`. For a list of all profiles available, run `$ANDROID_HOME/tools/bin/avdmanager list` and refer to the results under "Available Android Virtual Devices". |
|
||||||
| `emulator-options` | Optional | See below | Command-line options used when launching the emulator (replacing all default options) - e.g. `-no-window -no-snapshot -camera-back emulated`. |
|
| `emulator-options` | Optional | See below | Command-line options used when launching the emulator (replacing all default options) - e.g. `-no-window -no-snapshot -camera-back emulated`. |
|
||||||
| `disable-animations` | Optional | `true` | Whether to disable animations - `true` or `false`. |
|
| `disable-animations` | Optional | `true` | Whether to disable animations - `true` or `false`. |
|
||||||
|
|||||||
@@ -17,14 +17,14 @@ describe('api-level validator tests', () => {
|
|||||||
|
|
||||||
it('Throws if api-level is lower than min API supported', () => {
|
it('Throws if api-level is lower than min API supported', () => {
|
||||||
const func = () => {
|
const func = () => {
|
||||||
validator.checkApiLevel('20');
|
validator.checkApiLevel('14');
|
||||||
};
|
};
|
||||||
expect(func).toThrowError(`Minimum API level supported is ${validator.MIN_API_LEVEL}.`);
|
expect(func).toThrowError(`Minimum API level supported is ${validator.MIN_API_LEVEL}.`);
|
||||||
});
|
});
|
||||||
|
|
||||||
it('Validates successfully with valid api-level', () => {
|
it('Validates successfully with valid api-level', () => {
|
||||||
const func1 = () => {
|
const func1 = () => {
|
||||||
validator.checkApiLevel('21');
|
validator.checkApiLevel('15');
|
||||||
};
|
};
|
||||||
expect(func1).not.toThrow();
|
expect(func1).not.toThrow();
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
"use strict";
|
"use strict";
|
||||||
Object.defineProperty(exports, "__esModule", { value: true });
|
Object.defineProperty(exports, "__esModule", { value: true });
|
||||||
exports.MIN_API_LEVEL = 21;
|
exports.MIN_API_LEVEL = 15;
|
||||||
exports.VALID_TARGETS = ['default', 'google_apis'];
|
exports.VALID_TARGETS = ['default', 'google_apis'];
|
||||||
exports.VALID_ARCHS = ['x86', 'x86_64'];
|
exports.VALID_ARCHS = ['x86', 'x86_64'];
|
||||||
function checkApiLevel(apiLevel) {
|
function checkApiLevel(apiLevel) {
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
export const MIN_API_LEVEL = 21;
|
export const MIN_API_LEVEL = 15;
|
||||||
export const VALID_TARGETS: Array<string> = ['default', 'google_apis'];
|
export const VALID_TARGETS: Array<string> = ['default', 'google_apis'];
|
||||||
export const VALID_ARCHS: Array<string> = ['x86', 'x86_64'];
|
export const VALID_ARCHS: Array<string> = ['x86', 'x86_64'];
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user