Skip to content

Commit 53a1427

Browse files
authored
Merge pull request #13 from devicecloud-dev/update-missing-params
Update missing params (report, x86 arch), release 1.2.4
2 parents e047ba9 + e534efb commit 53a1427

File tree

4 files changed

+73
-32
lines changed

4 files changed

+73
-32
lines changed

action.yml

Lines changed: 47 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -2,76 +2,92 @@ name: 'Device Cloud Action'
22
author: 'devicecloud.dev'
33
description: 'Uses devicecloud.dev to execute Maestro mobile tests'
44
inputs:
5-
additional-app-binary-ids:
6-
description: 'The ID of the additional app binary(s) previously uploaded to devicecloud.dev to install before execution'
7-
required: false
8-
additional-app-files:
9-
description: 'Additional app binary(s) to install before execution'
10-
required: false
11-
android-api-level:
12-
description: 'Android API level to run your flow against'
13-
required: false
14-
android-device:
15-
description: 'Android device to run your flow against'
16-
required: false
175
api-key:
18-
description: 'devicecloud.dev API Key - find this in your app settings in the devicecloud.dev dashboard'
6+
description: 'API key for devicecloud.dev (find this in the console UI). You can also set the DEVICE_CLOUD_API_KEY environment variable.'
197
required: true
208
api-url:
21-
description: 'The API URL to use for the devicecloud.dev service'
9+
description: 'API URL for devicecloud.dev'
10+
required: false
11+
default: 'https://api.devicecloud.dev'
12+
app-file:
13+
description: 'App binary to run your flows against'
2214
required: false
2315
app-binary-id:
24-
description: 'The app binary already uploaded to devicecloud.dev'
16+
description: 'The ID of the app binary previously uploaded to devicecloud.dev'
2517
required: false
26-
app-file:
27-
description: 'Path to the build artifact to upload to devicecloud.dev before running the test'
18+
additional-app-files:
19+
description: '[default: ] Additional app binary(s) to install before execution'
20+
required: false
21+
additional-app-binary-ids:
22+
description: '[default: ] The ID of the additional app binary(s) previously uploaded to devicecloud.dev to install before execution'
23+
required: false
24+
android-api-level:
25+
description: '[Android only] Android API level to run your flow against <options: 29|30|31|32|33|34|35>'
26+
required: false
27+
android-device:
28+
description: '[Android only] Android device to run your flow against <options: pixel-6|pixel-6-pro|pixel-7|pixel-7-pro|generic-tablet>'
2829
required: false
2930
async:
30-
description: 'Whether to run Upload in async fashion and not block until completed'
31+
description: 'Immediately return (exit code 0) from the command without waiting for the results of the run (useful for saving CI minutes)'
3132
required: false
3233
device-locale:
3334
description: 'Locale that will be set to a device, ISO-639-1 code and uppercase ISO-3166-1 code e.g. "de_DE" for Germany'
3435
required: false
3536
download-artifacts:
36-
description: 'BETA (API may change) - download a zip containing the logs, screenshots and videos for each result in this run. Options: ALL|FAILED'
37+
description: 'Download a zip containing the logs, screenshots and videos for each result in this run. You will debited a $0.01 egress fee for each result. Use FAILED for failures only or ALL for every result. <options: ALL|FAILED>'
3738
required: false
3839
env:
39-
description: 'Set of key=value entries to pass as an input to Maestro flows'
40+
description: 'One or more environment variables to inject into your flows'
4041
required: false
4142
exclude-flows:
42-
description: 'Subdirectories to ignore when building the flow file list'
43+
description: '[default: ] Sub directories to ignore when building the flow file list'
4344
required: false
4445
exclude-tags:
45-
description: 'List of tags that will remove flows containing the provided tags'
46+
description: '[default: ] Flows which have these tags will be excluded from the run'
47+
required: false
48+
flows:
49+
description: 'The path to the flow file or folder containing your flows'
4650
required: false
4751
google-play:
48-
description: 'Run your flow against Google Play devices'
52+
description: '[Android only] Run your flow against Google Play devices'
53+
required: false
54+
ignore-sha-check:
55+
description: 'Ignore the sha hash check and upload the binary regardless of whether it already exists (not recommended)'
4956
required: false
5057
include-tags:
51-
description: 'List of tags that will remove flows that does not have the provided tags'
58+
description: '[default: ] Only flows which have these tags will be included in the run'
5259
required: false
5360
ios-device:
54-
description: 'iOS device to run your flow against'
61+
description: '[iOS only] iOS device to run your flow against <options: iphone-13|iphone-14|iphone-14-plus|iphone-14-pro|iphone-14-pro-max|iphone-15|iphone-15-plus|iphone-15-pro|iphone-15-pro-max|iphone-16|iphone-16-plus|iphone-16-pro|iphone-16-pro-max|ipad-pro-6th-gen>'
5562
required: false
5663
ios-version:
57-
description: 'iOS version to run your flow against'
64+
description: '[iOS only] iOS version to run your flow against <options: 16|17|18>'
5865
required: false
5966
maestro-version:
60-
description: 'ALPHA pre-release - Maestro version to run your flow against'
67+
description: 'Maestro version to run your flow against'
6168
required: false
69+
default: '1.39.5'
6270
name:
6371
description: 'A custom name for your upload (useful for tagging commits etc)'
6472
required: false
6573
orientation:
66-
description: 'Android only - The orientation of the device to run your flow against in degrees (90|180|270)'
74+
description: '[Android only] The orientation of the device to run your flow against in degrees <options: 0|90|180|270>'
6775
required: false
68-
workspace:
69-
description: 'Path to a folder that contains your test flows'
76+
quiet:
77+
description: 'Quieter console output that wont provide progress updates'
78+
required: false
79+
report:
80+
description: 'Runs Maestro with the --format flag, this will generate a report in the specified format <options: junit|html>'
7081
required: false
71-
default: './.maestro/'
7282
retry:
7383
description: 'Number of times to retry the run if it fails (same as pressing retry in the UI, this will deduct credits from your account)'
7484
required: false
85+
workspace:
86+
description: 'The path to the workspace folder containing your flows'
87+
required: false
88+
x86-arch:
89+
description: '[iOS only, experimental] Run your flow against x86 architecture simulator instead of arm64'
90+
required: false
7591

7692
runs:
7793
using: 'node20'

package.json

Lines changed: 1 addition & 1 deletion
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.2.3",
5+
"version": "1.2.4",
66
"main": "src/index.ts",
77
"license": "MIT",
88
"engines": {

src/index.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,14 +25,17 @@ const run = async (): Promise<void> => {
2525
excludeFlows,
2626
excludeTags,
2727
googlePlay,
28+
ignoreShaCheck,
2829
includeTags,
2930
iOSVersion,
3031
iosDevice,
3132
maestroVersion,
3233
name,
3334
orientation,
35+
report,
3436
retry,
3537
workspaceFolder,
38+
x86Arch,
3639
} = await getParameters();
3740

3841
const params: Record<string, any> = {
@@ -51,13 +54,16 @@ const run = async (): Promise<void> => {
5154
'exclude-tags': excludeTags,
5255
flows: workspaceFolder,
5356
'google-play': googlePlay,
57+
'ignore-sha-check': ignoreShaCheck,
5458
'include-tags': includeTags,
5559
'ios-device': iosDevice,
5660
'ios-version': iOSVersion,
5761
'maestro-version': maestroVersion,
5862
name,
5963
orientation,
64+
report,
6065
retry,
66+
'x86-arch': x86Arch,
6167
};
6268

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

src/methods/params.ts

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,9 @@ export type Params = {
2525
maestroVersion?: string;
2626
orientation?: 0 | 90 | 180 | 270;
2727
retry?: number;
28+
ignoreShaCheck?: boolean;
29+
report?: 'junit' | 'html';
30+
x86Arch?: boolean;
2831
};
2932

3033
function getAndroidApiLevel(apiLevel?: string): number | undefined {
@@ -151,6 +154,19 @@ export async function getParameters(): Promise<Params> {
151154
core.getInput('orientation', { required: false })
152155
);
153156

157+
const ignoreShaCheck =
158+
core.getInput('ignore-sha-check', { required: false }) === 'true';
159+
160+
const report = core.getInput('report', { required: false }) as
161+
| 'junit'
162+
| 'html'
163+
| undefined;
164+
if (report && report !== 'junit' && report !== 'html') {
165+
throw new Error('Report format must be either "junit" or "html"');
166+
}
167+
168+
const x86Arch = core.getInput('x86-arch', { required: false }) === 'true';
169+
154170
if (!(appFilePath !== '') !== (appBinaryId !== '')) {
155171
throw new Error('Either app-file or app-binary-id must be used');
156172
}
@@ -187,5 +203,8 @@ export async function getParameters(): Promise<Params> {
187203
maestroVersion,
188204
orientation,
189205
retry,
206+
ignoreShaCheck,
207+
report,
208+
x86Arch,
190209
};
191210
}

0 commit comments

Comments
 (0)