Skip to content

Commit

Permalink
use cloud replay logical version when checking for base test run in c…
Browse files Browse the repository at this point in the history
…loud action
  • Loading branch information
alexivanov committed Mar 20, 2024
1 parent fe2fd75 commit 7491923
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 36 deletions.
65 changes: 31 additions & 34 deletions out/in-cloud.entrypoint.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions src/actions/in-cloud/in-cloud.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ export const runMeticulousTestsInCloudAction = async (): Promise<void> => {
event,
apiToken,
base,
useCloudReplayEnvironmentVersion: false,
context,
octokit,
});
Expand Down
1 change: 1 addition & 0 deletions src/actions/main/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ export const runMeticulousTestsAction = async (): Promise<void> => {
event,
apiToken,
base,
useCloudReplayEnvironmentVersion: false,
context,
octokit,
});
Expand Down
7 changes: 5 additions & 2 deletions src/common/ensure-base-exists.utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,13 @@ export const ensureBaseTestsExists = async ({
apiToken,
base, // from the PR event
context,
useCloudReplayEnvironmentVersion,
octokit,
}: {
event: CodeChangeEvent;
apiToken: string;
base: string | null;
useCloudReplayEnvironmentVersion: boolean;
context: Context;
octokit: InstanceType<typeof GitHub>;
}): Promise<{ shaToCompareAgainst: string | null }> => {
Expand All @@ -69,8 +71,9 @@ export const ensureBaseTestsExists = async ({
const testRun = await getLatestTestRunResults({
client: createClient({ apiToken }),
commitSha: base,
// TODO(in-cloud action): Set useCloudReplayEnvironmentVersion instead
logicalEnvironmentVersion: LOGICAL_ENVIRONMENT_VERSION,
...(useCloudReplayEnvironmentVersion
? { useCloudReplayEnvironmentVersion: true }
: { logicalEnvironmentVersion: LOGICAL_ENVIRONMENT_VERSION }),
});

if (testRun != null) {
Expand Down

0 comments on commit 7491923

Please sign in to comment.