From ad2516b1c8766939a2ba16c1d0e565b90799b32b Mon Sep 17 00:00:00 2001 From: Vincent Koc Date: Wed, 29 Apr 2026 05:40:19 -0700 Subject: [PATCH] fix(ci): tolerate legacy plugin contract targets --- .github/workflows/ci.yml | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) 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";