Fix Gitea quality gate portability
Staging Backend Quality Gate / validate (pull_request) Failing after 19m39s
Staging Backend Quality Gate / publish (pull_request) Has been cancelled

This commit is contained in:
Jesse_Chen
2026-08-05 11:52:38 +08:00
parent b6fd860fb4
commit 7fe29dcf01
4 changed files with 39 additions and 3 deletions
+3 -1
View File
@@ -1,13 +1,15 @@
"use client";
import { useGSAP } from "@gsap/react";
import { gsap } from "gsap";
import gsapModule from "gsap";
import { useRef } from "react";
import { AgentActivityStatus } from "@/components/agent-activity-status";
import { ChatMessageContent } from "@/components/chat-message-content";
import type { ChatMessageView } from "@/lib/chat-message-view";
const gsap = (gsapModule as typeof gsapModule & { gsap?: typeof gsapModule }).gsap ?? gsapModule;
gsap.registerPlugin(useGSAP);
export function AgentAvatar() {
@@ -83,10 +83,15 @@ test("changed staging workflows are syntactically valid YAML", () => {
giteaMigrationWorkflow,
]) {
const result = spawnSync(
"ruby",
["-e", "require 'yaml'; YAML.parse_file(ARGV.fetch(0))", fileURLToPath(workflow)],
"python",
[
"-c",
"import sys,yaml; yaml.safe_load(open(sys.argv[1], encoding='utf-8'))",
fileURLToPath(workflow),
],
{ encoding: "utf8" },
);
assert.ifError(result.error);
assert.equal(result.status, 0, result.stderr);
}
});
@@ -126,6 +131,11 @@ test("Gitea quality gate validates before publishing an immutable ACR manifest",
assert.equal((workflow.match(/git status --porcelain --untracked-files=all/g) ?? []).length, 2);
assert.match(workflow, /python3 -m venv \.venv/);
assert.match(workflow, /python -m playwright install --with-deps chromium/);
assert.match(workflow, /DOCKER_COMPOSE_VERSION: v2\.39\.1/);
assert.match(workflow, /docker-compose-linux-\$compose_arch/);
assert.match(workflow, /sha256sum -c -/);
assert.match(workflow, /docker compose version --short/);
assert.match(workflow, /docker compose --help \| grep -q -- '--project-name'/);
assert.equal((workflow.match(/npm test --prefix frontend/g) ?? []).length, 1);
assert.equal((workflow.match(/npm run lint --prefix frontend/g) ?? []).length, 1);
assert.equal((workflow.match(/npm run build --prefix frontend/g) ?? []).length, 1);