From df43755f664c3bbc385fd40c287f2a891ce504dd Mon Sep 17 00:00:00 2001 From: Quentin Date: Thu, 19 Sep 2024 12:15:39 +0100 Subject: [PATCH] Tweak --- out/cloud-compute.entrypoint.js | 2 +- src/actions/cloud-compute/run-test-run.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/out/cloud-compute.entrypoint.js b/out/cloud-compute.entrypoint.js index 8075c91..21a0ee1 100644 --- a/out/cloud-compute.entrypoint.js +++ b/out/cloud-compute.entrypoint.js @@ -95,5 +95,5 @@ METICULOUS_TUNNEL_USERNAME="${i}" METICULOUS_TUNNEL_PASSWORD="${n}" npx @alwaysm --apiToken="" \`\`\` -To find a test session to replay and and to find your API token: visit the 'Selected Sessions' tab or 'All Sessions' tab on your [Meticulous project page](${nL}), click on a session and select the 'Simulate' tab.`,testSuiteId:`__meticulous_debug_${a}__`,shortHeadSha:re(s),createIfDoesNotExist:!0,logger:u}).catch(e=>{u.error(e)})},onTestRunCreated:e=>{u.info(`Test run created: ${e.url}`)},onProgressUpdate:e=>{(0,s0.IN_PROGRESS_TEST_RUN_STATUS).includes(e.status)||!v||y||(u.info(`Test run execution completed. Keeping tunnel open for ${rr.toHuman()}`),y=setTimeout(()=>{v.resolve()},rr.as("milliseconds")));let t=e.configData.testCases?.length||0,a=e.resultData?.results?.length||0;a!=I&&t&&(u.info(`Executed ${a}/${t} test cases`),I=a)},onTunnelStillLocked:()=>{u.info("The test run has completed but additional tasks on the Meticulous platform are using this deployment, please keep this job running...")},...v?{keepTunnelOpenPromise:v.promise}:{}})};(async()=>{let e=ii(),t=await (0,tM.initSentry)("report-diffs-action-cloud-compute-v1",1),a=t.startTransaction({name:"report-diffs-action.runMeticulousTestsActionInCloud",description:"Run Meticulous tests action (in cloud)",op:"report-diffs-action.runMeticulousTestsActionInCloud"}),i="",{projectTargets:s,headSha:n,githubToken:r}=s1(),o=n||a3(),l=s.filter(e=>e.skip),p=s.filter(e=>!e.skip),d=1===s.length&&"default"===s[0].name;if(l.length>0){let t=l.map(e=>e.name);e.info(`Skipping test runs for the following targets: ${t.join(", ")}`)}(await Promise.allSettled(p.map(e=>rl({testRunId:e.name,apiToken:e.apiToken,appUrl:e.appUrl,githubToken:r,headSha:o,isSingleTestRunExecution:d})))).forEach((e,t)=>{if("rejected"===e.status){let a=e.reason instanceof Error?e.reason.message:`${e.reason}`;d?i=a:i+=`Test run ${p[t].name} failed: ${a} +To find a test session to replay and to find your API token: visit the 'Selected Sessions' tab or 'All Sessions' tab on your [Meticulous project page](${nL}), click on a session and select the 'Simulate' tab.`,testSuiteId:`__meticulous_debug_${a}__`,shortHeadSha:re(s),createIfDoesNotExist:!0,logger:u}).catch(e=>{u.error(e)})},onTestRunCreated:e=>{u.info(`Test run created: ${e.url}`)},onProgressUpdate:e=>{(0,s0.IN_PROGRESS_TEST_RUN_STATUS).includes(e.status)||!v||y||(u.info(`Test run execution completed. Keeping tunnel open for ${rr.toHuman()}`),y=setTimeout(()=>{v.resolve()},rr.as("milliseconds")));let t=e.configData.testCases?.length||0,a=e.resultData?.results?.length||0;a!=I&&t&&(u.info(`Executed ${a}/${t} test cases`),I=a)},onTunnelStillLocked:()=>{u.info("The test run has completed but additional tasks on the Meticulous platform are using this deployment, please keep this job running...")},...v?{keepTunnelOpenPromise:v.promise}:{}})};(async()=>{let e=ii(),t=await (0,tM.initSentry)("report-diffs-action-cloud-compute-v1",1),a=t.startTransaction({name:"report-diffs-action.runMeticulousTestsActionInCloud",description:"Run Meticulous tests action (in cloud)",op:"report-diffs-action.runMeticulousTestsActionInCloud"}),i="",{projectTargets:s,headSha:n,githubToken:r}=s1(),o=n||a3(),l=s.filter(e=>e.skip),p=s.filter(e=>!e.skip),d=1===s.length&&"default"===s[0].name;if(l.length>0){let t=l.map(e=>e.name);e.info(`Skipping test runs for the following targets: ${t.join(", ")}`)}(await Promise.allSettled(p.map(e=>rl({testRunId:e.name,apiToken:e.apiToken,appUrl:e.appUrl,githubToken:r,headSha:o,isSingleTestRunExecution:d})))).forEach((e,t)=>{if("rejected"===e.status){let a=e.reason instanceof Error?e.reason.message:`${e.reason}`;d?i=a:i+=`Test run ${p[t].name} failed: ${a} `}}),i?((0,tP.setFailed)(i),a.setStatus("unknown_error")):a.setStatus("ok"),a.finish(),await t.getClient()?.close(5e3),process.exit(i?1:0)})().catch(e=>{let t=e instanceof Error?e.message:`${e}`;(0,tP.setFailed)(t),process.exit(1)}); \ No newline at end of file diff --git a/src/actions/cloud-compute/run-test-run.ts b/src/actions/cloud-compute/run-test-run.ts index b2dfb2f..20b69b7 100644 --- a/src/actions/cloud-compute/run-test-run.ts +++ b/src/actions/cloud-compute/run-test-run.ts @@ -171,7 +171,7 @@ export const runOneTestRun = async ({ ` --appUrl="${url}" \\\n` + ` --apiToken=""\n` + `\`\`\`\n\n` + - `To find a test session to replay and and to find your API token: visit the 'Selected Sessions' tab or 'All Sessions' tab on your [Meticulous project page](${METICULIOUS_APP_URL}), click on a session and select the 'Simulate' tab.`, + `To find a test session to replay and to find your API token: visit the 'Selected Sessions' tab or 'All Sessions' tab on your [Meticulous project page](${METICULIOUS_APP_URL}), click on a session and select the 'Simulate' tab.`, testSuiteId: `__meticulous_debug_${testRunId}__`, shortHeadSha: shortCommitSha(headSha), createIfDoesNotExist: true,