diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index baf99c717cc..37d48a346f2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -141,9 +141,6 @@ jobs: import { createChannelContractTestShards, } from "./scripts/lib/channel-contract-test-plan.mjs"; - import { - createPluginContractTestShards, - } from "./scripts/lib/plugin-contract-test-plan.mjs"; const parseBoolean = (value, fallback = false) => { if (value === undefined) return fallback; @@ -153,6 +150,24 @@ jobs: return fallback; }; + const { createPluginContractTestShards } = await import( + "./scripts/lib/plugin-contract-test-plan.mjs" + ).catch((error) => { + if (error?.code !== "ERR_MODULE_NOT_FOUND") { + throw error; + } + return { + createPluginContractTestShards: () => [ + { + checkName: "checks-fast-contracts-plugins-legacy", + includePatterns: ["src/plugins/contracts/**/*.test.ts"], + runtime: "node", + task: "contracts-plugins", + }, + ], + }; + }); + const createMatrix = (include) => ({ include }); const outputPath = process.env.GITHUB_OUTPUT; const isCanonicalRepository = process.env.OPENCLAW_CI_REPOSITORY === "openclaw/openclaw";