mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-06 12:10:42 +00:00
fix(ci): exclude private qa sidecars from install verify
This commit is contained in:
@@ -15,6 +15,7 @@ import { isAbsolute, join, relative } from "node:path";
|
||||
import { pathToFileURL } from "node:url";
|
||||
import { formatErrorMessage } from "../src/infra/errors.ts";
|
||||
import { BUNDLED_RUNTIME_SIDECAR_PATHS } from "../src/plugins/runtime-sidecar-paths.ts";
|
||||
import { listBundledPluginPackArtifacts } from "./lib/bundled-plugin-build-entries.mjs";
|
||||
import {
|
||||
collectBundledPluginRootRuntimeMirrorErrors,
|
||||
collectRootDistBundledRuntimeMirrors,
|
||||
@@ -43,6 +44,9 @@ type InstalledBundledExtensionManifestRecord = {
|
||||
const MAX_BUNDLED_EXTENSION_MANIFEST_BYTES = 1024 * 1024;
|
||||
const LEGACY_CONTEXT_ENGINE_UNRESOLVED_RUNTIME_MARKER =
|
||||
"Failed to load legacy context engine runtime.";
|
||||
const PUBLISHED_BUNDLED_RUNTIME_SIDECAR_PATHS = BUNDLED_RUNTIME_SIDECAR_PATHS.filter(
|
||||
(relativePath) => listBundledPluginPackArtifacts().includes(relativePath),
|
||||
);
|
||||
|
||||
export type PublishedInstallScenario = {
|
||||
name: string;
|
||||
@@ -90,7 +94,7 @@ export function collectInstalledPackageErrors(params: {
|
||||
);
|
||||
}
|
||||
|
||||
for (const relativePath of BUNDLED_RUNTIME_SIDECAR_PATHS) {
|
||||
for (const relativePath of PUBLISHED_BUNDLED_RUNTIME_SIDECAR_PATHS) {
|
||||
if (!existsSync(join(params.packageRoot, relativePath))) {
|
||||
errors.push(`installed package is missing required bundled runtime sidecar: ${relativePath}`);
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@ import { mkdirSync, mkdtempSync, rmSync, symlinkSync, writeFileSync } from "node
|
||||
import { tmpdir } from "node:os";
|
||||
import { dirname, join } from "node:path";
|
||||
import { describe, expect, it } from "vitest";
|
||||
import { listBundledPluginPackArtifacts } from "../scripts/lib/bundled-plugin-build-entries.mjs";
|
||||
import {
|
||||
buildPublishedInstallCommandArgs,
|
||||
buildPublishedInstallScenarios,
|
||||
@@ -13,6 +14,10 @@ import {
|
||||
} from "../scripts/openclaw-npm-postpublish-verify.ts";
|
||||
import { BUNDLED_RUNTIME_SIDECAR_PATHS } from "../src/plugins/runtime-sidecar-paths.ts";
|
||||
|
||||
const PUBLISHED_BUNDLED_RUNTIME_SIDECAR_PATHS = BUNDLED_RUNTIME_SIDECAR_PATHS.filter(
|
||||
(relativePath) => listBundledPluginPackArtifacts().includes(relativePath),
|
||||
);
|
||||
|
||||
describe("buildPublishedInstallScenarios", () => {
|
||||
it("uses a single fresh scenario for plain stable releases", () => {
|
||||
expect(buildPublishedInstallScenarios("2026.3.23")).toEqual([
|
||||
@@ -70,13 +75,21 @@ describe("collectInstalledPackageErrors", () => {
|
||||
);
|
||||
expect(errors).toEqual(
|
||||
expect.arrayContaining(
|
||||
BUNDLED_RUNTIME_SIDECAR_PATHS.map(
|
||||
PUBLISHED_BUNDLED_RUNTIME_SIDECAR_PATHS.map(
|
||||
(relativePath) =>
|
||||
`installed package is missing required bundled runtime sidecar: ${relativePath}`,
|
||||
),
|
||||
),
|
||||
);
|
||||
expect(errors.length).toBeGreaterThanOrEqual(1 + BUNDLED_RUNTIME_SIDECAR_PATHS.length);
|
||||
expect(errors).not.toEqual(
|
||||
expect.arrayContaining([
|
||||
"installed package is missing required bundled runtime sidecar: dist/extensions/qa-channel/runtime-api.js",
|
||||
"installed package is missing required bundled runtime sidecar: dist/extensions/qa-lab/runtime-api.js",
|
||||
]),
|
||||
);
|
||||
expect(errors.length).toBeGreaterThanOrEqual(
|
||||
1 + PUBLISHED_BUNDLED_RUNTIME_SIDECAR_PATHS.length,
|
||||
);
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user