mirror of
https://github.com/openclaw/clawhub.git
synced 2026-08-14 00:47:57 +00:00
ci: cut local-auth e2e critical path (#3140)
This commit is contained in:
@@ -152,7 +152,7 @@ jobs:
|
||||
timeout-minutes: 30
|
||||
strategy:
|
||||
fail-fast: false
|
||||
max-parallel: 1
|
||||
max-parallel: 8
|
||||
matrix:
|
||||
include:
|
||||
- name: account-cleanup
|
||||
@@ -163,10 +163,10 @@ jobs:
|
||||
specs: |
|
||||
e2e/local-auth/header-profile-link.pw.test.ts
|
||||
e2e/local-auth/manage-context-proof.pw.test.ts
|
||||
- name: moderation-star
|
||||
specs: |
|
||||
e2e/local-auth/malicious-skill-ban-flow.pw.test.ts
|
||||
e2e/local-auth/skill-star-sync.pw.test.ts
|
||||
- name: moderation-malicious
|
||||
specs: e2e/local-auth/malicious-skill-ban-flow.pw.test.ts
|
||||
- name: star-sync
|
||||
specs: e2e/local-auth/skill-star-sync.pw.test.ts
|
||||
- name: inspector-version
|
||||
specs: |
|
||||
e2e/local-auth/plugin-inspector-findings.pw.test.ts
|
||||
|
||||
@@ -571,7 +571,11 @@ export async function publishSkillVersion(
|
||||
type PublishState = "duplicate" | "pending" | "private-detail" | "published" | "staged" | "";
|
||||
const readPublishState = async (): Promise<PublishState> => {
|
||||
if (await hasDuplicateVersionAlert(page, args.version)) return "duplicate";
|
||||
if (detailUrlPattern.test(new URL(page.url()).pathname)) {
|
||||
const pathname = new URL(page.url()).pathname;
|
||||
// Staged publishes redirect to the dashboard as soon as Convex accepts the
|
||||
// upload. Treat that navigation as success instead of waiting and retrying.
|
||||
if (pathname === "/dashboard") return "staged";
|
||||
if (detailUrlPattern.test(pathname)) {
|
||||
if (await isPublishedDetailCurrentVersionVisible(page, args)) {
|
||||
return "published";
|
||||
}
|
||||
|
||||
@@ -91,11 +91,6 @@ function withoutExpectedPublishFlowErrors(errors: string[]) {
|
||||
error.includes("Function execution timed out (maximum duration: 1s)") &&
|
||||
recoverableTimeouts.some((functionName) => error.includes(functionName))
|
||||
) &&
|
||||
!(
|
||||
error.includes("CONVEX A(skills:publishVersion)") &&
|
||||
error.includes("Version ") &&
|
||||
error.includes(" already exists")
|
||||
) &&
|
||||
!(error.includes("CONVEX A(skills:publishVersion)") && error.includes("Unauthorized")) &&
|
||||
!(
|
||||
error.includes("CONVEX A(skills:publishVersion)") &&
|
||||
|
||||
@@ -159,11 +159,6 @@ async function expectHealthyPublishPage(page: Page, errors: string[]) {
|
||||
!(
|
||||
error.includes("Function execution timed out (maximum duration: 1s)") &&
|
||||
expectedTransientTimeouts.some((functionName) => error.includes(functionName))
|
||||
) &&
|
||||
!(
|
||||
error.includes("CONVEX A(skills:publishVersion)") &&
|
||||
error.includes("Version ") &&
|
||||
error.includes(" already exists")
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
@@ -9,20 +9,33 @@ type WorkflowStep = {
|
||||
};
|
||||
|
||||
describe("playwright local-auth workflow", () => {
|
||||
it("provides enough CPU for local Convex and reports runner pressure", async () => {
|
||||
it("runs isolated local-auth shards concurrently and reports runner pressure", async () => {
|
||||
const workflow = parseYaml(await readFile(".github/workflows/ci.yml", "utf8")) as {
|
||||
jobs: {
|
||||
"playwright-local-auth-shard": {
|
||||
"runs-on": string;
|
||||
steps: WorkflowStep[];
|
||||
strategy?: { "max-parallel"?: number };
|
||||
strategy?: {
|
||||
"max-parallel"?: number;
|
||||
matrix?: { include?: Array<{ name?: string; specs?: string }> };
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
const job = workflow.jobs["playwright-local-auth-shard"];
|
||||
|
||||
expect(job["runs-on"]).toBe("blacksmith-16vcpu-ubuntu-2404");
|
||||
expect(job.strategy?.["max-parallel"]).toBe(1);
|
||||
expect(job.strategy?.["max-parallel"]).toBe(8);
|
||||
expect(job.strategy?.matrix?.include?.map((entry) => entry.name)).toEqual(
|
||||
expect.arrayContaining(["moderation-malicious", "star-sync"]),
|
||||
);
|
||||
expect(
|
||||
job.strategy?.matrix?.include?.some(
|
||||
(entry) =>
|
||||
entry.specs?.includes("malicious-skill-ban-flow.pw.test.ts") &&
|
||||
entry.specs.includes("skill-star-sync.pw.test.ts"),
|
||||
),
|
||||
).toBe(false);
|
||||
|
||||
const localAuthStep = job.steps.find((step) => step.name === "Local-auth browser e2e");
|
||||
expect(localAuthStep?.run).toContain("/sys/fs/cgroup/cpu.stat");
|
||||
|
||||
Reference in New Issue
Block a user