Skip to content

Commit 176647a

Browse files
authored
ci: gate frozen QA smoke by capability (#105006)
1 parent 33da64c commit 176647a

2 files changed

Lines changed: 14 additions & 1 deletion

File tree

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -460,7 +460,7 @@ jobs:
460460
const compactPullRequest = isCanonicalRepository && eventName === "pull_request";
461461
const runQaSmokeCi =
462462
runNodeFull &&
463-
(!compatibilityTarget || existsSync("extensions/qa-lab/src/ci-smoke-plan.ts"));
463+
(!frozenTarget || existsSync("extensions/qa-lab/src/ci-smoke-plan.ts"));
464464
const nodeTestShards = runNodeFull
465465
? createNodeTestPlan({
466466
includeReleaseOnlyPluginShards: false,

test/scripts/ci-workflow-guards.test.ts

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ function runCiManifestFixture(options: {
6060
iosBuildCapability?: boolean;
6161
nativeI18nCapabilities?: boolean;
6262
protocolCoverage?: boolean;
63+
qaSmokePlan?: boolean;
6364
formatCheck?: boolean;
6465
releaseCandidateCompatibility?: boolean;
6566
}) {
@@ -125,6 +126,8 @@ function runCiManifestFixture(options: {
125126
path.join(scriptsDir, "plugin-contract-test-plan.mjs"),
126127
`export const createPluginContractTestShards = () => [{ checkName: "plugin-contracts" }];\n`,
127128
);
129+
}
130+
if (options.qaSmokePlan ?? options.bundledPlanner) {
128131
const smokePlan = path.join(root, "extensions", "qa-lab", "src", "ci-smoke-plan.ts");
129132
mkdirSync(path.dirname(smokePlan), { recursive: true });
130133
writeFileSync(smokePlan, "export {};\n");
@@ -1714,13 +1717,22 @@ describe("ci workflow guards", () => {
17141717
expect(currentMissingIos.outputs.run_ios_build).toBe("true");
17151718
expect(currentMissingIos.outputs.run_macos_swift).toBe("true");
17161719

1720+
const currentMissingQaPlan = runCiManifestFixture({
1721+
bundledPlanner: true,
1722+
eventName: "pull_request",
1723+
qaSmokePlan: false,
1724+
});
1725+
expect(currentMissingQaPlan.status, currentMissingQaPlan.output).toBe(0);
1726+
expect(currentMissingQaPlan.outputs.run_qa_smoke_ci).toBe("true");
1727+
17171728
const frozenMissingCurrentCapabilities = runCiManifestFixture({
17181729
bundledPlanner: true,
17191730
historicalCompatibility: false,
17201731
iosCapabilities: false,
17211732
iosBuildCapability: true,
17221733
nativeI18nCapabilities: false,
17231734
protocolCoverage: false,
1735+
qaSmokePlan: false,
17241736
formatCheck: false,
17251737
});
17261738
expect(frozenMissingCurrentCapabilities.status, frozenMissingCurrentCapabilities.output).toBe(
@@ -1730,6 +1742,7 @@ describe("ci workflow guards", () => {
17301742
expect(frozenMissingCurrentCapabilities.outputs.run_ios_build).toBe("false");
17311743
expect(frozenMissingCurrentCapabilities.outputs.run_macos_swift).toBe("false");
17321744
expect(frozenMissingCurrentCapabilities.outputs.run_native_i18n).toBe("false");
1745+
expect(frozenMissingCurrentCapabilities.outputs.run_qa_smoke_ci).toBe("false");
17331746
expect(frozenMissingCurrentCapabilities.outputs.run_protocol_event_coverage).toBe("false");
17341747
expect(frozenMissingCurrentCapabilities.outputs.run_format_check).toBe("false");
17351748

0 commit comments

Comments
 (0)