fix(staging): retry exact gate checkout
Staging Backend Quality Gate / validate (pull_request) Successful in 18m30s
Staging Backend Quality Gate / publish (pull_request) Has been skipped

This commit is contained in:
Jesse
2026-08-06 20:13:59 +08:00
parent 9f71e849a0
commit 9c20efd16d
4 changed files with 56 additions and 4 deletions
@@ -141,6 +141,12 @@ test("Gitea quality gate validates before publishing an immutable ACR manifest",
assert.match(workflow, /GITEA_SHA: \$\{\{ gitea\.sha \}\}/);
assert.equal((workflow.match(/git clean -ffdx/g) ?? []).length, 2);
assert.equal((workflow.match(/git status --porcelain --untracked-files=all/g) ?? []).length, 2);
assert.equal((workflow.match(/for attempt in 1 2 3/g) ?? []).length, 5);
assert.equal((workflow.match(/timeout 300 git -c http\.connectTimeout=15 -c http\.lowSpeedLimit=1 -c http\.lowSpeedTime=60/g) ?? []).length, 2);
assert.equal((workflow.match(/fetch --depth=1 --no-tags origin "\$GITEA_SHA"/g) ?? []).length, 2);
assert.equal((workflow.match(/exact staging gate checkout failed after \$attempt bounded attempts/g) ?? []).length, 2);
assert.equal((workflow.match(/\[\[ "\$fetch_succeeded" == true \]\]/g) ?? []).length, 2);
assert.doesNotMatch(workflow, /http\.lowSpeedLimit=1024|http\.lowSpeedTime=30/);
assert.match(workflow, /python3 -m venv \.venv/);
assert.match(workflow, /PIP_INDEX_URL: https:\/\/mirrors\.aliyun\.com\/pypi\/simple\//);
assert.match(workflow, /NPM_CONFIG_REGISTRY: https:\/\/registry\.npmmirror\.com/);