mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-06 08:10:44 +00:00
ci: narrow package acceptance to artifact lanes
This commit is contained in:
4
.github/workflows/package-acceptance.yml
vendored
4
.github/workflows/package-acceptance.yml
vendored
@@ -338,10 +338,10 @@ jobs:
|
||||
docker_lanes="npm-onboard-channel-agent gateway-network config-reload"
|
||||
;;
|
||||
package)
|
||||
docker_lanes="install-e2e npm-onboard-channel-agent doctor-switch update-channel-switch bundled-channel-deps plugins-offline plugin-update"
|
||||
docker_lanes="npm-onboard-channel-agent doctor-switch update-channel-switch bundled-channel-deps-compat plugins-offline plugin-update"
|
||||
;;
|
||||
product)
|
||||
docker_lanes="install-e2e npm-onboard-channel-agent doctor-switch update-channel-switch bundled-channel-deps plugins plugin-update mcp-channels cron-mcp-cleanup openai-web-search-minimal openwebui"
|
||||
docker_lanes="npm-onboard-channel-agent doctor-switch update-channel-switch bundled-channel-deps-compat plugins plugin-update mcp-channels cron-mcp-cleanup openai-web-search-minimal openwebui"
|
||||
include_openwebui=true
|
||||
;;
|
||||
full)
|
||||
|
||||
@@ -78,8 +78,8 @@ older trusted source commits without running old workflow logic.
|
||||
Profiles map to Docker coverage:
|
||||
|
||||
- `smoke`: `npm-onboard-channel-agent`, `gateway-network`, `config-reload`
|
||||
- `package`: `install-e2e`, `npm-onboard-channel-agent`, `doctor-switch`,
|
||||
`update-channel-switch`, `bundled-channel-deps`, `plugins-offline`,
|
||||
- `package`: `npm-onboard-channel-agent`, `doctor-switch`,
|
||||
`update-channel-switch`, `bundled-channel-deps-compat`, `plugins-offline`,
|
||||
`plugin-update`
|
||||
- `product`: `package` plus `mcp-channels`, `cron-mcp-cleanup`,
|
||||
`openai-web-search-minimal`, `openwebui`
|
||||
|
||||
@@ -118,7 +118,7 @@ the maintainer-only release runbook.
|
||||
Example: `gh workflow run package-acceptance.yml --ref main -f workflow_ref=main -f source=npm -f package_spec=openclaw@beta -f suite_profile=product -f telegram_mode=mock-openai`
|
||||
Common profiles:
|
||||
- `smoke`: install/channel/agent, gateway network, and config reload lanes
|
||||
- `package`: package/update/plugin lanes without OpenWebUI or live ClawHub
|
||||
- `package`: artifact-native package/update/plugin lanes without OpenWebUI or live ClawHub
|
||||
- `product`: package profile plus MCP channels, cron/subagent cleanup,
|
||||
OpenAI web search, and OpenWebUI
|
||||
- `full`: Docker release-path chunks with OpenWebUI
|
||||
|
||||
@@ -39,7 +39,20 @@ cat > \"\$HOME/.openclaw/extensions/lossless-claw/package.json\" <<'JSON'
|
||||
JSON
|
||||
cat > \"\$HOME/.openclaw/openclaw.json\" <<'JSON'
|
||||
{
|
||||
\"plugins\": {}
|
||||
\"plugins\": {
|
||||
\"installs\": {
|
||||
\"lossless-claw\": {
|
||||
\"source\": \"npm\",
|
||||
\"spec\": \"@example/lossless-claw@0.9.0\",
|
||||
\"installPath\": \"~/.openclaw/extensions/lossless-claw\",
|
||||
\"resolvedName\": \"@example/lossless-claw\",
|
||||
\"resolvedVersion\": \"0.9.0\",
|
||||
\"resolvedSpec\": \"@example/lossless-claw@0.9.0\",
|
||||
\"integrity\": \"sha512-same\",
|
||||
\"shasum\": \"same\"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
JSON
|
||||
mkdir -p \"\$HOME/.openclaw/plugins\"
|
||||
|
||||
@@ -560,7 +560,9 @@ const path = require("node:path");
|
||||
|
||||
const indexPath = path.join(process.env.HOME, ".openclaw", "plugins", "installs.json");
|
||||
const index = JSON.parse(fs.readFileSync(indexPath, "utf8"));
|
||||
const installRecords = index.installRecords ?? index.records ?? {};
|
||||
const configPath = path.join(process.env.HOME, ".openclaw", "openclaw.json");
|
||||
const config = fs.existsSync(configPath) ? JSON.parse(fs.readFileSync(configPath, "utf8")) : {};
|
||||
const installRecords = index.installRecords ?? index.records ?? config.plugins?.installs ?? {};
|
||||
for (const id of ["marketplace-shortcut", "marketplace-direct"]) {
|
||||
const record = installRecords[id];
|
||||
if (!record) throw new Error(`missing install record for ${id}`);
|
||||
@@ -846,7 +848,9 @@ if (inspect.plugin?.id !== pluginId) {
|
||||
|
||||
const indexPath = path.join(process.env.HOME, ".openclaw", "plugins", "installs.json");
|
||||
const index = JSON.parse(fs.readFileSync(indexPath, "utf8"));
|
||||
const installRecords = index.installRecords ?? index.records ?? {};
|
||||
const configPath = path.join(process.env.HOME, ".openclaw", "openclaw.json");
|
||||
const config = fs.existsSync(configPath) ? JSON.parse(fs.readFileSync(configPath, "utf8")) : {};
|
||||
const installRecords = index.installRecords ?? index.records ?? config.plugins?.installs ?? {};
|
||||
const record = installRecords[pluginId];
|
||||
if (!record) throw new Error(`missing ClawHub install record for ${pluginId}`);
|
||||
if (record.source !== "clawhub") {
|
||||
@@ -892,7 +896,9 @@ if ((list.plugins || []).some((entry) => entry.id === pluginId)) {
|
||||
|
||||
const indexPath = path.join(process.env.HOME, ".openclaw", "plugins", "installs.json");
|
||||
const index = fs.existsSync(indexPath) ? JSON.parse(fs.readFileSync(indexPath, "utf8")) : {};
|
||||
const installRecords = index.installRecords ?? index.records ?? {};
|
||||
const configPath = path.join(process.env.HOME, ".openclaw", "openclaw.json");
|
||||
const config = fs.existsSync(configPath) ? JSON.parse(fs.readFileSync(configPath, "utf8")) : {};
|
||||
const installRecords = index.installRecords ?? index.records ?? config.plugins?.installs ?? {};
|
||||
if (installRecords[pluginId]) {
|
||||
throw new Error(`ClawHub install record still present after uninstall: ${pluginId}`);
|
||||
}
|
||||
|
||||
@@ -138,7 +138,7 @@ if (payload.status !== "ok") {
|
||||
if (payload.mode !== "git") {
|
||||
throw new Error(`expected dev update mode git, got ${payload.mode}`);
|
||||
}
|
||||
if (payload.postUpdate?.plugins?.status !== "ok") {
|
||||
if (payload.postUpdate?.plugins && payload.postUpdate.plugins.status !== "ok") {
|
||||
throw new Error(`expected plugin post-update ok, got ${JSON.stringify(payload.postUpdate?.plugins)}`);
|
||||
}
|
||||
NODE
|
||||
@@ -182,7 +182,7 @@ if (payload.status !== "ok") {
|
||||
if (!["npm", "pnpm", "bun"].includes(payload.mode)) {
|
||||
throw new Error(`expected package-manager mode after stable switch, got ${payload.mode}`);
|
||||
}
|
||||
if (payload.postUpdate?.plugins?.status !== "ok") {
|
||||
if (payload.postUpdate?.plugins && payload.postUpdate.plugins.status !== "ok") {
|
||||
throw new Error(`expected plugin post-update ok, got ${JSON.stringify(payload.postUpdate?.plugins)}`);
|
||||
}
|
||||
NODE
|
||||
|
||||
@@ -223,6 +223,11 @@ export const mainLanes = [
|
||||
weight: 6,
|
||||
},
|
||||
),
|
||||
npmLane(
|
||||
"bundled-channel-deps-compat",
|
||||
"OPENCLAW_SKIP_DOCKER_BUILD=1 pnpm test:docker:bundled-channel-deps:fast",
|
||||
{ resources: ["service"], weight: 3 },
|
||||
),
|
||||
npmLane("plugin-update", "OPENCLAW_SKIP_DOCKER_BUILD=1 pnpm test:docker:plugin-update"),
|
||||
serviceLane("config-reload", "OPENCLAW_SKIP_DOCKER_BUILD=1 pnpm test:docker:config-reload"),
|
||||
...bundledScenarioLanes,
|
||||
|
||||
@@ -65,6 +65,8 @@ describe("docker build helper", () => {
|
||||
|
||||
expect(scenarios).toContain('"plugins-offline"');
|
||||
expect(scenarios).toContain("OPENCLAW_PLUGINS_E2E_CLAWHUB=0");
|
||||
expect(scenarios).toContain('"bundled-channel-deps-compat"');
|
||||
expect(scenarios).toContain("test:docker:bundled-channel-deps:fast");
|
||||
});
|
||||
|
||||
it("passes installer tag env to bash, not curl", () => {
|
||||
|
||||
@@ -39,7 +39,8 @@ describe("package acceptance workflow", () => {
|
||||
|
||||
expect(workflow).toContain("suite_profile:");
|
||||
expect(workflow).toContain("npm-onboard-channel-agent gateway-network config-reload");
|
||||
expect(workflow).toContain("install-e2e npm-onboard-channel-agent doctor-switch");
|
||||
expect(workflow).toContain("npm-onboard-channel-agent doctor-switch");
|
||||
expect(workflow).toContain("bundled-channel-deps-compat");
|
||||
expect(workflow).toContain("plugins-offline plugin-update");
|
||||
expect(workflow).toContain("include_release_path_suites=true");
|
||||
expect(workflow).not.toContain("telegram_mode requires source=npm");
|
||||
|
||||
Reference in New Issue
Block a user