mirror of
https://github.com/openclaw/openclaw.git
synced 2026-06-05 15:22:57 +00:00
ci: split startup and shrinkwrap checks
This commit is contained in:
7
.github/workflows/ci.yml
vendored
7
.github/workflows/ci.yml
vendored
@@ -1202,6 +1202,9 @@ jobs:
|
||||
- check_name: check-guards
|
||||
task: guards
|
||||
runner: blacksmith-4vcpu-ubuntu-2404
|
||||
- check_name: check-shrinkwrap
|
||||
task: shrinkwrap
|
||||
runner: blacksmith-4vcpu-ubuntu-2404
|
||||
- check_name: check-prod-types
|
||||
task: prod-types
|
||||
runner: blacksmith-4vcpu-ubuntu-2404
|
||||
@@ -1277,7 +1280,6 @@ jobs:
|
||||
pnpm tool-display:check
|
||||
pnpm check:host-env-policy:swift
|
||||
pnpm dup:check:coverage
|
||||
pnpm deps:shrinkwrap:check
|
||||
pnpm deps:patches:check
|
||||
pnpm lint:webhook:no-low-level-body-read
|
||||
pnpm lint:auth:no-pairing-store-group
|
||||
@@ -1286,6 +1288,9 @@ jobs:
|
||||
# build-artifacts already runs the tsdown/runtime build for the same Node-relevant changes.
|
||||
NODE_OPTIONS=--max-old-space-size=8192 pnpm build:plugin-sdk:strict-smoke
|
||||
;;
|
||||
shrinkwrap)
|
||||
pnpm deps:shrinkwrap:check
|
||||
;;
|
||||
prod-types)
|
||||
pnpm tsgo:prod
|
||||
;;
|
||||
|
||||
@@ -37,6 +37,7 @@ function isPnpmStoreWarmupGatedJobName(name) {
|
||||
name === "build-artifacts" ||
|
||||
name === "check-docs" ||
|
||||
name === "check-guards" ||
|
||||
name === "check-shrinkwrap" ||
|
||||
name === "check-prod-types" ||
|
||||
name === "check-lint" ||
|
||||
name === "check-dependencies" ||
|
||||
|
||||
@@ -281,6 +281,26 @@ function isGatewayServerTestFile(file) {
|
||||
);
|
||||
}
|
||||
|
||||
function resolveGatewayStartupShardName(file) {
|
||||
const name = relative("src/gateway", file).replaceAll("\\", "/");
|
||||
if (name.startsWith("server-startup-config") || name.startsWith("server-startup-early")) {
|
||||
return "agentic-control-plane-startup-config";
|
||||
}
|
||||
if (
|
||||
name.startsWith("server-runtime") ||
|
||||
name.startsWith("server.health") ||
|
||||
name.startsWith("server.lazy") ||
|
||||
name.startsWith("server/health-state") ||
|
||||
name.startsWith("server/readiness")
|
||||
) {
|
||||
return "agentic-control-plane-startup-health-runtime";
|
||||
}
|
||||
if (name.startsWith("server-restart") || name === "server-close.test.ts") {
|
||||
return "agentic-control-plane-startup-restart-close";
|
||||
}
|
||||
return "agentic-control-plane-startup-core";
|
||||
}
|
||||
|
||||
function resolveGatewayServerShardName(file) {
|
||||
const name = relative("src/gateway", file).replaceAll("\\", "/");
|
||||
if (
|
||||
@@ -318,7 +338,7 @@ function resolveGatewayServerShardName(file) {
|
||||
name.startsWith("server/readiness") ||
|
||||
name === "server-close.test.ts"
|
||||
) {
|
||||
return "agentic-control-plane-startup-runtime";
|
||||
return resolveGatewayStartupShardName(file);
|
||||
}
|
||||
if (name.includes("cron")) {
|
||||
return "agentic-control-plane-runtime-cron";
|
||||
@@ -380,7 +400,10 @@ function createGatewayServerSplitShards() {
|
||||
"agentic-control-plane-runtime-shared-token",
|
||||
"agentic-control-plane-runtime-state",
|
||||
"agentic-control-plane-runtime-ui-tools",
|
||||
"agentic-control-plane-startup-runtime",
|
||||
"agentic-control-plane-startup-config",
|
||||
"agentic-control-plane-startup-core",
|
||||
"agentic-control-plane-startup-health-runtime",
|
||||
"agentic-control-plane-startup-restart-close",
|
||||
]
|
||||
.map((shardName) => ({
|
||||
configs: ["test/vitest/vitest.gateway-server.config.ts"],
|
||||
|
||||
@@ -513,7 +513,10 @@ describe("scripts/lib/ci-node-test-plan.mjs", () => {
|
||||
"agentic-control-plane-runtime-shared-token",
|
||||
"agentic-control-plane-runtime-state",
|
||||
"agentic-control-plane-runtime-ui-tools",
|
||||
"agentic-control-plane-startup-runtime",
|
||||
"agentic-control-plane-startup-config",
|
||||
"agentic-control-plane-startup-core",
|
||||
"agentic-control-plane-startup-health-runtime",
|
||||
"agentic-control-plane-startup-restart-close",
|
||||
]);
|
||||
expect(controlPlaneShards).toEqual(
|
||||
controlPlaneShards.map((shard) => ({
|
||||
|
||||
@@ -123,11 +123,16 @@ describe("ci workflow guards", () => {
|
||||
const workflow = readFileSync(".github/workflows/ci.yml", "utf8");
|
||||
const preflightGuards = workflow.slice(
|
||||
workflow.indexOf("guards)"),
|
||||
workflow.indexOf("shrinkwrap)"),
|
||||
);
|
||||
const shrinkwrapGuards = workflow.slice(
|
||||
workflow.indexOf("shrinkwrap)"),
|
||||
workflow.indexOf("prod-types)"),
|
||||
);
|
||||
|
||||
expect(workflow).toContain("check-guards");
|
||||
expect(preflightGuards).toContain("pnpm deps:shrinkwrap:check");
|
||||
expect(workflow).toContain("check-shrinkwrap");
|
||||
expect(shrinkwrapGuards).toContain("pnpm deps:shrinkwrap:check");
|
||||
expect(preflightGuards).toContain("pnpm deps:patches:check");
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user