Skip to content

Commit d755ed0

Browse files
committed
add runner-type param
1 parent 130911f commit d755ed0

File tree

5 files changed

+26
-2
lines changed

5 files changed

+26
-2
lines changed

README.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -330,6 +330,20 @@ For iOS tests, you can run your flows against x86 architecture simulators instea
330330
x86-arch: true
331331
```
332332

333+
# Runner Types (Experimental)
334+
335+
You can specify a custom runner type using the `runner-type` parameter:
336+
337+
```yaml
338+
- uses: devicecloud-dev/device-cloud-for-maestro@v1
339+
with:
340+
api-key: ${{ secrets.DCD_API_KEY }}
341+
app-file: app.apk
342+
runner-type: premium
343+
```
344+
345+
Note: Anything other than the default runner type will incur premium pricing. See the [documentation](https://docs.devicecloud.dev/reference/runner-type) for more information.
346+
333347
# Custom config file
334348

335349
You can specify a custom path to your Maestro config file. Defaults to looking for config.yaml in the workspace folder.
@@ -440,4 +454,5 @@ Here's a complete example showing all available options:
440454
download-artifacts: FAILED # ALL|FAILED
441455
api-url: https://api.devicecloud.dev
442456
config: path/to/maestro-config.yaml
457+
runner-type: default # Experimental: m1|m4
443458
```

action.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,10 @@ inputs:
9090
config:
9191
description: 'Specific path to your maestro config file'
9292
required: false
93+
runner-type:
94+
description: '[experimental] The type of runner to use <options: m1|m4> - note: anything other than default will incur premium pricing tiers. See https://docs.devicecloud.dev/reference/runner-type for more information'
95+
required: false
96+
default: 'default'
9397

9498
outputs:
9599
DEVICE_CLOUD_CONSOLE_URL:

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "dcd-github-action",
33
"description": "run maestro tests on devicecloud.dev",
44
"author": "devicecloud.dev",
5-
"version": "1.3.3",
5+
"version": "1.3.4",
66
"main": "src/index.ts",
77
"license": "MIT",
88
"engines": {
@@ -26,4 +26,4 @@
2626
"typescript": "^5.1.6"
2727
},
2828
"packageManager": "[email protected]+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e"
29-
}
29+
}

src/index.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,7 @@ const run = async (): Promise<void> => {
107107
retry,
108108
workspaceFolder,
109109
x86Arch,
110+
runnerType,
110111
} = await getParameters();
111112

112113
const params: Record<string, any> = {
@@ -136,6 +137,7 @@ const run = async (): Promise<void> => {
136137
report,
137138
retry,
138139
'x86-arch': x86Arch,
140+
'runner-type': runnerType,
139141
};
140142

141143
let paramsString = Object.keys(params).reduce((acc, key) => {

src/methods/params.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ export type Params = {
2929
report?: 'junit' | 'html';
3030
x86Arch?: boolean;
3131
config?: string;
32+
runnerType?: string;
3233
};
3334

3435
function getAndroidApiLevel(apiLevel?: string): number | undefined {
@@ -168,6 +169,7 @@ export async function getParameters(): Promise<Params> {
168169

169170
const x86Arch = core.getInput('x86-arch', { required: false }) === 'true';
170171
const config = core.getInput('config', { required: false });
172+
const runnerType = core.getInput('runner-type', { required: false });
171173

172174
if (!(appFilePath !== '') !== (appBinaryId !== '')) {
173175
throw new Error('Either app-file or app-binary-id must be used');
@@ -209,5 +211,6 @@ export async function getParameters(): Promise<Params> {
209211
report,
210212
x86Arch,
211213
config,
214+
runnerType,
212215
};
213216
}

0 commit comments

Comments
 (0)