Revert "Leave staging workflow contracts to coordinated update"
This reverts commit 84449e2ef3.
This commit is contained in:
@@ -189,6 +189,31 @@ test("Gitea quality gate validates before publishing an immutable ACR manifest",
|
||||
assert.doesNotMatch(workflow, /(?:^|:)latest$/m);
|
||||
});
|
||||
|
||||
test("Gitea staging mutation workflows use the available runner and pinned Node tooling", () => {
|
||||
for (const workflow of [read(giteaDeployWorkflow), read(giteaMigrationWorkflow)]) {
|
||||
assert.equal((workflow.match(/runs-on: manman-linux/g) ?? []).length, 1);
|
||||
assert.doesNotMatch(workflow, /runs-on: xiaoxin/);
|
||||
assert.equal((workflow.match(/NODE_TOOL_SOURCE_IMAGE: swr\.cn-north-4\.myhuaweicloud\.com\/ddn-k8s\/docker\.io\/library\/node:22-bookworm-slim@sha256:ef343465b6a14bbdf2ab52f6e100ec0659a792464fcf72c462370d88b3df909c/g) ?? []).length, 1);
|
||||
assert.equal((workflow.match(/NODE_TOOL_IMAGE: node:22-bookworm-slim/g) ?? []).length, 1);
|
||||
assert.match(workflow, /timeout 180 docker pull "\$NODE_TOOL_SOURCE_IMAGE"/);
|
||||
assert.match(workflow, /docker tag "\$NODE_TOOL_SOURCE_IMAGE" "\$NODE_TOOL_IMAGE"/);
|
||||
assert.match(workflow, /cat > "\$tool_dir\/node" <<'EOF'/);
|
||||
assert.match(workflow, /--volume "\$workdir:\$workdir"/);
|
||||
assert.match(workflow, /--workdir "\$workdir"/);
|
||||
assert.match(workflow, /node:22-bookworm-slim "\$\{0##\*\/\}" "\$@"/);
|
||||
assert.match(workflow, />> "\$GITHUB_PATH"/);
|
||||
assert.match(workflow, /node frontend\/scripts\/staging-image-manifest\.mjs/);
|
||||
assert.doesNotMatch(workflow, /packages\+=\((?:nodejs|npm)\)|apt-get install[^\n]*(?:nodejs|npm)/);
|
||||
assert.doesNotMatch(workflow, /(?:--volume|-v)[^\n]*(?:\$HOME\/\.docker|DOCKER_CONFIG)/);
|
||||
assertOrder(workflow, [
|
||||
"Checkout trusted main controller",
|
||||
"Prepare pinned Node tooling",
|
||||
"Download gate-produced",
|
||||
"node frontend/scripts/staging-image-manifest.mjs",
|
||||
]);
|
||||
}
|
||||
});
|
||||
|
||||
test("quality gate builds the Python package with its declared backend dependencies", () => {
|
||||
const workflow = read(qualityWorkflow);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user