Skip to content

Commit 35d03c6

Browse files
author
finalerock44
committed
revert: remove accidental commits to main (changes belong on feature branch)
1 parent 3ceb27f commit 35d03c6

4 files changed

Lines changed: 21 additions & 136 deletions

File tree

action.yml

Lines changed: 5 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -68,26 +68,24 @@ inputs:
6868
maestro-version:
6969
description: 'Maestro version to run your flow against'
7070
required: false
71-
71+
moropo-v1-api-key:
72+
description: 'API key for Moropo v1 integration'
73+
required: false
7274
name:
7375
description: 'A custom name for your upload (useful for tagging commits etc)'
7476
required: false
7577
orientation:
7678
description: '[Android only] The orientation of the device to run your flow against in degrees <options: 0|90|180|270>'
7779
required: false
7880
quiet:
79-
description: 'Quieter console output that wont provide progress updates. Defaults to true in CI.'
81+
description: 'Quieter console output that wont provide progress updates'
8082
required: false
81-
default: 'true'
8283
report:
83-
description: 'Runs Maestro with the --format flag, this will generate a report in the specified format <options: junit|html|html-detailed|allure>'
84+
description: 'Runs Maestro with the --format flag, this will generate a report in the specified format <options: junit|html|html-detailed>'
8485
required: false
8586
retry:
8687
description: 'Number of times to retry the run if it fails (same as pressing retry in the UI, this is free)'
8788
required: false
88-
moropo-v1-api-key:
89-
description: 'API key for Moropo v1 integration'
90-
required: false
9189
workspace:
9290
description: 'The path to the workspace folder containing your flows'
9391
required: false
@@ -118,33 +116,6 @@ inputs:
118116
description: 'Automatically attach GitHub/PR context (branch, SHA, PR number, PR URL, run ID, repo) to the test run as metadata. Set to "false" to opt out.'
119117
required: false
120118
default: 'true'
121-
app-url:
122-
description: 'Signed URL to an Expo iOS build (.tar.gz). The archive is downloaded and extracted automatically. Expo signed URLs expire after ~1 hour.'
123-
required: false
124-
show-crosshairs:
125-
description: '[Android only] Display crosshairs for screen interactions during test execution'
126-
required: false
127-
dry-run:
128-
description: 'Simulate the run without actually triggering the upload/test, useful for debugging workflow issues'
129-
required: false
130-
metadata:
131-
description: 'One or more key=value metadata pairs to attach to the run (one per line, e.g. MY_KEY=my_value)'
132-
required: false
133-
json:
134-
description: 'Output results in JSON format. Note: will always provide exit code 0'
135-
required: false
136-
json-file-name:
137-
description: 'Custom name for the JSON output file (can include relative path). Requires json-file: true.'
138-
required: false
139-
allure-path:
140-
description: 'Custom file path for downloaded Allure report (requires report: allure, default: ./report.html)'
141-
required: false
142-
html-path:
143-
description: 'Custom file path for downloaded HTML report (requires report: html, default: ./report.html)'
144-
required: false
145-
artifacts-path:
146-
description: 'Custom file path for downloaded artifacts zip (default: ./artifacts.zip)'
147-
required: false
148119

149120
outputs:
150121
DEVICE_CLOUD_CONSOLE_URL:

dist/index.js

Lines changed: 8 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -31602,7 +31602,7 @@ const getLatestDcdVersion = (...args_1) => __awaiter(void 0, [...args_1], void 0
3160231602
const run = () => __awaiter(void 0, void 0, void 0, function* () {
3160331603
var _a;
3160431604
try {
31605-
const { additionalAppBinaryIds, additionalAppFiles, androidApiLevel, androidDevice, apiKey, apiUrl, appBinaryId, appFilePath, appUrl, async, config, deviceLocale, downloadArtifacts, env, excludeFlows, excludeTags, googlePlay, ignoreShaCheck, includeTags, iOSVersion, iosDevice, jsonFile, jsonFileName, json, maestroVersion, name, orientation, report, retry, workspaceFolder, runnerType, debug, quiet, moropoV1ApiKey, useBeta, maestroChromeOnboarding, androidNoSnapshot, disableAnimations, showCrosshairs, dryRun, userMetadata, allurePath, htmlPath, artifactsPath, githubContext, } = yield (0, params_1.getParameters)();
31605+
const { additionalAppBinaryIds, additionalAppFiles, androidApiLevel, androidDevice, apiKey, apiUrl, appBinaryId, appFilePath, async, config, deviceLocale, downloadArtifacts, env, excludeFlows, excludeTags, googlePlay, ignoreShaCheck, includeTags, iOSVersion, iosDevice, jsonFile, maestroVersion, name, orientation, report, retry, workspaceFolder, runnerType, debug, moropoV1ApiKey, useBeta, maestroChromeOnboarding, androidNoSnapshot, disableAnimations, githubContext, } = yield (0, params_1.getParameters)();
3160631606
const REMOVED_MAESTRO_VERSIONS = ['1.39.2', '1.39.7', '2.0.3'];
3160731607
if (maestroVersion && REMOVED_MAESTRO_VERSIONS.includes(maestroVersion)) {
3160831608
(0, core_1.setFailed)(`Maestro version ${maestroVersion} is no longer supported. ` +
@@ -31619,7 +31619,6 @@ const run = () => __awaiter(void 0, void 0, void 0, function* () {
3161931619
'api-url': apiUrl,
3162031620
'app-binary-id': appBinaryId,
3162131621
'app-file': appFilePath,
31622-
'app-url': appUrl,
3162331622
async,
3162431623
config,
3162531624
'device-locale': deviceLocale,
@@ -31638,20 +31637,12 @@ const run = () => __awaiter(void 0, void 0, void 0, function* () {
3163831637
report,
3163931638
retry,
3164031639
'runner-type': runnerType,
31641-
json,
3164231640
'json-file': jsonFile,
31643-
'json-file-name': jsonFileName,
3164431641
debug,
31645-
quiet,
3164631642
'moropo-v1-api-key': moropoV1ApiKey,
3164731643
'maestro-chrome-onboarding': maestroChromeOnboarding,
3164831644
'android-no-snapshot': androidNoSnapshot,
3164931645
'disable-animations': disableAnimations,
31650-
'show-crosshairs': showCrosshairs,
31651-
'dry-run': dryRun,
31652-
'allure-path': allurePath,
31653-
'html-path': htmlPath,
31654-
'artifacts-path': artifactsPath,
3165531646
};
3165631647
let paramsString = Object.keys(params).reduce((acc, key) => {
3165731648
if (!params[key])
@@ -31672,11 +31663,6 @@ const run = () => __awaiter(void 0, void 0, void 0, function* () {
3167231663
paramsString += ` --env ${key}=${escapeShellValue(value)}`;
3167331664
});
3167431665
}
31675-
if (userMetadata && userMetadata.length > 0) {
31676-
userMetadata.forEach((pair) => {
31677-
paramsString += ` --metadata ${escapeShellValue(pair)}`;
31678-
});
31679-
}
3168031666
if (githubContext && githubContext.length > 0) {
3168131667
githubContext.forEach((pair) => {
3168231668
paramsString += ` --metadata ${escapeShellValue(pair)}`;
@@ -31686,7 +31672,7 @@ const run = () => __awaiter(void 0, void 0, void 0, function* () {
3168631672
let uploadId = null;
3168731673
let testOutput = '';
3168831674
try {
31689-
const { output, exitCode } = yield executeCommand(`npx --yes "${dcdVersionString}" cloud ${paramsString}`);
31675+
const { output, exitCode } = yield executeCommand(`npx --yes "${dcdVersionString}" cloud ${paramsString} --quiet`);
3169031676
testOutput = output;
3169131677
if (exitCode === 1) {
3169231678
throw new Error('DeviceCloud CLI failed to run - check your parameters or contact support');
@@ -31905,27 +31891,22 @@ function getParameters() {
3190531891
const orientation = parseOrientation(core.getInput('orientation', { required: false }));
3190631892
const ignoreShaCheck = core.getInput('ignore-sha-check', { required: false }) === 'true';
3190731893
const report = core.getInput('report', { required: false });
31894+
if (report && report !== 'junit' && report !== 'html') {
31895+
throw new Error('Report format must be either "junit" or "html"');
31896+
}
3190831897
const config = core.getInput('config', { required: false });
3190931898
const runnerType = core.getInput('runner-type', { required: false });
3191031899
const jsonFile = core.getInput('json-file', { required: false }) === 'true';
3191131900
const debug = core.getInput('debug', { required: false }) === 'true';
31912-
const moropoV1ApiKey = core.getInput('moropo-v1-api-key', { required: false });
31901+
const moropoV1ApiKey = core.getInput('moropo-v1-api-key', {
31902+
required: false,
31903+
});
3191331904
const useBeta = core.getInput('use-beta', { required: false }) === 'true';
3191431905
const includeGithubContext = core.getInput('include-github-context', { required: false }) !== 'false';
3191531906
const githubContext = includeGithubContext ? getGithubContextMetadata() : undefined;
3191631907
const maestroChromeOnboarding = core.getInput('maestro-chrome-onboarding', { required: false }) === 'true';
3191731908
const androidNoSnapshot = core.getInput('android-no-snapshot', { required: false }) === 'true';
3191831909
const disableAnimations = core.getInput('disable-animations', { required: false }) === 'true';
31919-
const showCrosshairs = core.getInput('show-crosshairs', { required: false }) === 'true';
31920-
const dryRun = core.getInput('dry-run', { required: false }) === 'true';
31921-
const appUrl = core.getInput('app-url', { required: false }) || undefined;
31922-
const userMetadata = core.getMultilineInput('metadata', { required: false });
31923-
const json = core.getInput('json', { required: false }) === 'true';
31924-
const jsonFileName = core.getInput('json-file-name', { required: false }) || undefined;
31925-
const allurePath = core.getInput('allure-path', { required: false }) || undefined;
31926-
const htmlPath = core.getInput('html-path', { required: false }) || undefined;
31927-
const artifactsPath = core.getInput('artifacts-path', { required: false }) || undefined;
31928-
const quiet = core.getInput('quiet', { required: false }) !== 'false';
3192931910
if (!(appFilePath !== '') !== (appBinaryId !== '')) {
3193031911
throw new Error('Either app-file or app-binary-id must be used');
3193131912
}
@@ -31937,7 +31918,6 @@ function getParameters() {
3193731918
apiUrl,
3193831919
apiKey,
3193931920
appFilePath,
31940-
appUrl,
3194131921
workspaceFolder,
3194231922
env,
3194331923
async,
@@ -31963,21 +31943,12 @@ function getParameters() {
3196331943
config,
3196431944
runnerType,
3196531945
jsonFile,
31966-
jsonFileName,
31967-
json,
3196831946
debug,
31969-
quiet,
3197031947
moropoV1ApiKey,
3197131948
useBeta,
3197231949
maestroChromeOnboarding,
3197331950
androidNoSnapshot,
3197431951
disableAnimations,
31975-
showCrosshairs,
31976-
dryRun,
31977-
userMetadata,
31978-
allurePath,
31979-
htmlPath,
31980-
artifactsPath,
3198131952
githubContext,
3198231953
};
3198331954
});

src/index.ts

Lines changed: 1 addition & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,6 @@ const run = async (): Promise<void> => {
130130
apiUrl,
131131
appBinaryId,
132132
appFilePath,
133-
appUrl,
134133
async,
135134
config,
136135
deviceLocale,
@@ -144,8 +143,6 @@ const run = async (): Promise<void> => {
144143
iOSVersion,
145144
iosDevice,
146145
jsonFile,
147-
jsonFileName,
148-
json,
149146
maestroVersion,
150147
name,
151148
orientation,
@@ -154,19 +151,11 @@ const run = async (): Promise<void> => {
154151
workspaceFolder,
155152
runnerType,
156153
debug,
157-
quiet,
158-
159154
moropoV1ApiKey,
160155
useBeta,
161156
maestroChromeOnboarding,
162157
androidNoSnapshot,
163158
disableAnimations,
164-
showCrosshairs,
165-
dryRun,
166-
userMetadata,
167-
allurePath,
168-
htmlPath,
169-
artifactsPath,
170159
githubContext,
171160
} = await getParameters();
172161

@@ -190,7 +179,6 @@ const run = async (): Promise<void> => {
190179
'api-url': apiUrl,
191180
'app-binary-id': appBinaryId,
192181
'app-file': appFilePath,
193-
'app-url': appUrl,
194182
async,
195183
config,
196184
'device-locale': deviceLocale,
@@ -209,21 +197,12 @@ const run = async (): Promise<void> => {
209197
report,
210198
retry,
211199
'runner-type': runnerType,
212-
json,
213200
'json-file': jsonFile,
214-
'json-file-name': jsonFileName,
215201
debug,
216-
quiet,
217-
218202
'moropo-v1-api-key': moropoV1ApiKey,
219203
'maestro-chrome-onboarding': maestroChromeOnboarding,
220204
'android-no-snapshot': androidNoSnapshot,
221205
'disable-animations': disableAnimations,
222-
'show-crosshairs': showCrosshairs,
223-
'dry-run': dryRun,
224-
'allure-path': allurePath,
225-
'html-path': htmlPath,
226-
'artifacts-path': artifactsPath,
227206
};
228207

229208
let paramsString = Object.keys(params).reduce((acc, key) => {
@@ -247,12 +226,6 @@ const run = async (): Promise<void> => {
247226
});
248227
}
249228

250-
if (userMetadata && userMetadata.length > 0) {
251-
userMetadata.forEach((pair) => {
252-
paramsString += ` --metadata ${escapeShellValue(pair)}`;
253-
});
254-
}
255-
256229
if (githubContext && githubContext.length > 0) {
257230
githubContext.forEach((pair) => {
258231
paramsString += ` --metadata ${escapeShellValue(pair)}`;
@@ -265,7 +238,7 @@ const run = async (): Promise<void> => {
265238

266239
try {
267240
const { output, exitCode } = await executeCommand(
268-
`npx --yes "${dcdVersionString}" cloud ${paramsString}`
241+
`npx --yes "${dcdVersionString}" cloud ${paramsString} --quiet`
269242
);
270243
testOutput = output;
271244

src/methods/params.ts

Lines changed: 7 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ export type Params = {
55
apiKey: string;
66
apiUrl: string;
77
appFilePath: string;
8-
appUrl?: string;
98
workspaceFolder: string | null;
109
env?: string[];
1110
async?: boolean;
@@ -27,26 +26,16 @@ export type Params = {
2726
orientation?: 0 | 90 | 180 | 270;
2827
retry?: number;
2928
ignoreShaCheck?: boolean;
30-
report?: 'junit' | 'html' | 'html-detailed' | 'allure';
29+
report?: 'junit' | 'html';
3130
config?: string;
3231
runnerType?: string;
3332
jsonFile?: boolean;
34-
jsonFileName?: string;
35-
json?: boolean;
3633
debug?: boolean;
37-
quiet?: boolean;
38-
3934
moropoV1ApiKey?: string;
4035
useBeta?: boolean;
4136
maestroChromeOnboarding?: boolean;
4237
androidNoSnapshot?: boolean;
4338
disableAnimations?: boolean;
44-
showCrosshairs?: boolean;
45-
dryRun?: boolean;
46-
userMetadata?: string[];
47-
allurePath?: string;
48-
htmlPath?: string;
49-
artifactsPath?: string;
5039
githubContext?: string[];
5140
};
5241

@@ -207,16 +196,18 @@ export async function getParameters(): Promise<Params> {
207196
const report = core.getInput('report', { required: false }) as
208197
| 'junit'
209198
| 'html'
210-
| 'html-detailed'
211-
| 'allure'
212199
| undefined;
200+
if (report && report !== 'junit' && report !== 'html') {
201+
throw new Error('Report format must be either "junit" or "html"');
202+
}
213203

214204
const config = core.getInput('config', { required: false });
215205
const runnerType = core.getInput('runner-type', { required: false });
216206
const jsonFile = core.getInput('json-file', { required: false }) === 'true';
217207
const debug = core.getInput('debug', { required: false }) === 'true';
218-
219-
const moropoV1ApiKey = core.getInput('moropo-v1-api-key', { required: false });
208+
const moropoV1ApiKey = core.getInput('moropo-v1-api-key', {
209+
required: false,
210+
});
220211
const useBeta = core.getInput('use-beta', { required: false }) === 'true';
221212

222213
const includeGithubContext =
@@ -226,16 +217,6 @@ export async function getParameters(): Promise<Params> {
226217
const maestroChromeOnboarding = core.getInput('maestro-chrome-onboarding', { required: false }) === 'true';
227218
const androidNoSnapshot = core.getInput('android-no-snapshot', { required: false }) === 'true';
228219
const disableAnimations = core.getInput('disable-animations', { required: false }) === 'true';
229-
const showCrosshairs = core.getInput('show-crosshairs', { required: false }) === 'true';
230-
const dryRun = core.getInput('dry-run', { required: false }) === 'true';
231-
const appUrl = core.getInput('app-url', { required: false }) || undefined;
232-
const userMetadata = core.getMultilineInput('metadata', { required: false });
233-
const json = core.getInput('json', { required: false }) === 'true';
234-
const jsonFileName = core.getInput('json-file-name', { required: false }) || undefined;
235-
const allurePath = core.getInput('allure-path', { required: false }) || undefined;
236-
const htmlPath = core.getInput('html-path', { required: false }) || undefined;
237-
const artifactsPath = core.getInput('artifacts-path', { required: false }) || undefined;
238-
const quiet = core.getInput('quiet', { required: false }) !== 'false';
239220

240221
if (!(appFilePath !== '') !== (appBinaryId !== '')) {
241222
throw new Error('Either app-file or app-binary-id must be used');
@@ -253,7 +234,6 @@ export async function getParameters(): Promise<Params> {
253234
apiUrl,
254235
apiKey,
255236
appFilePath,
256-
appUrl,
257237
workspaceFolder,
258238
env,
259239
async,
@@ -279,22 +259,12 @@ export async function getParameters(): Promise<Params> {
279259
config,
280260
runnerType,
281261
jsonFile,
282-
jsonFileName,
283-
json,
284262
debug,
285-
quiet,
286-
287263
moropoV1ApiKey,
288264
useBeta,
289265
maestroChromeOnboarding,
290266
androidNoSnapshot,
291267
disableAnimations,
292-
showCrosshairs,
293-
dryRun,
294-
userMetadata,
295-
allurePath,
296-
htmlPath,
297-
artifactsPath,
298268
githubContext,
299269
};
300270
}

0 commit comments

Comments
 (0)