Skip to content

Commit

Permalink
make the e2e smoke label a requirement.
Browse files Browse the repository at this point in the history
  • Loading branch information
cortisiko committed Oct 18, 2024
1 parent 9d15c75 commit 67fce8b
Showing 1 changed file with 31 additions and 31 deletions.
62 changes: 31 additions & 31 deletions .github/scripts/bitrise/run-bitrise-e2e-check.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,37 +58,37 @@ async function main(): Promise<void> {
const hasSmokeTestLabel = labels.some((label) => label.name === e2eLabel);

// Pass check since e2e smoke label is not applied
if (!hasSmokeTestLabel) {
console.log(
`"${e2eLabel}" label not applied. Skipping Bitrise status check.`,
);
// Post success status (skipped)
const createStatusCheckResponse = await octokit.rest.checks.create({
owner,
repo,
name: statusCheckName,
head_sha: latestCommitHash,
status: StatusCheckStatusType.Completed,
conclusion: CompletedConclusionType.Success,
started_at: new Date().toISOString(),
output: {
title: statusCheckTitle,
summary: 'Skip run since no E2E smoke label is applied',
},
});

if (createStatusCheckResponse.status === 201) {
console.log(
`Created '${statusCheckName}' check with skipped status for commit ${latestCommitHash}`,
);
} else {
core.setFailed(
`Failed to create '${statusCheckName}' check with skipped status for commit ${latestCommitHash} with status code ${createStatusCheckResponse.status}`,
);
process.exit(1);
}
return;
}
// if (!hasSmokeTestLabel) {
// console.log(
// `"${e2eLabel}" label not applied. Skipping Bitrise status check.`,
// );
// // Post success status (skipped)
// const createStatusCheckResponse = await octokit.rest.checks.create({
// owner,
// repo,
// name: statusCheckName,
// head_sha: latestCommitHash,
// status: StatusCheckStatusType.Completed,
// conclusion: CompletedConclusionType.Success,
// started_at: new Date().toISOString(),
// output: {
// title: statusCheckTitle,
// summary: 'Skip run since no E2E smoke label is applied',
// },
// });

// if (createStatusCheckResponse.status === 201) {
// console.log(
// `Created '${statusCheckName}' check with skipped status for commit ${latestCommitHash}`,
// );
// } else {
// core.setFailed(
// `Failed to create '${statusCheckName}' check with skipped status for commit ${latestCommitHash} with status code ${createStatusCheckResponse.status}`,
// );
// process.exit(1);
// }
// return;
// }

// Kick off E2E smoke tests if E2E smoke label is applied
if (
Expand Down

0 comments on commit 67fce8b

Please sign in to comment.