Skip to content

Commit ad2516b

Browse files
committed
fix(ci): tolerate legacy plugin contract targets
1 parent 8f2dd02 commit ad2516b

1 file changed

Lines changed: 18 additions & 3 deletions

File tree

.github/workflows/ci.yml

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -141,9 +141,6 @@ jobs:
141141
import {
142142
createChannelContractTestShards,
143143
} from "./scripts/lib/channel-contract-test-plan.mjs";
144-
import {
145-
createPluginContractTestShards,
146-
} from "./scripts/lib/plugin-contract-test-plan.mjs";
147144
148145
const parseBoolean = (value, fallback = false) => {
149146
if (value === undefined) return fallback;
@@ -153,6 +150,24 @@ jobs:
153150
return fallback;
154151
};
155152
153+
const { createPluginContractTestShards } = await import(
154+
"./scripts/lib/plugin-contract-test-plan.mjs"
155+
).catch((error) => {
156+
if (error?.code !== "ERR_MODULE_NOT_FOUND") {
157+
throw error;
158+
}
159+
return {
160+
createPluginContractTestShards: () => [
161+
{
162+
checkName: "checks-fast-contracts-plugins-legacy",
163+
includePatterns: ["src/plugins/contracts/**/*.test.ts"],
164+
runtime: "node",
165+
task: "contracts-plugins",
166+
},
167+
],
168+
};
169+
});
170+
156171
const createMatrix = (include) => ({ include });
157172
const outputPath = process.env.GITHUB_OUTPUT;
158173
const isCanonicalRepository = process.env.OPENCLAW_CI_REPOSITORY === "openclaw/openclaw";

0 commit comments

Comments
 (0)