Run integration tests on runner tooling
Staging Backend Quality Gate / validate (pull_request) Failing after 13m5s
Staging Backend Quality Gate / publish (pull_request) Has been skipped

This commit is contained in:
Jesse_Chen
2026-08-05 17:16:21 +08:00
parent 2e62dc15bf
commit c2949bbb50
2 changed files with 15 additions and 66 deletions
@@ -148,22 +148,21 @@ test("Gitea quality gate validates before publishing an immutable ACR manifest",
assert.match(workflow, /packages\+=\(python3-venv\)/);
assert.match(workflow, /sysconfig\.get_path\("include"\)[\s\S]*packages\+=\(python3-dev\)/);
assert.match(workflow, /command -v g\+\+[\s\S]*packages\+=\(g\+\+\)/);
assert.match(workflow, /command -v rsync[\s\S]*packages\+=\(rsync\)/);
assert.match(workflow, /apt-get install -y --no-install-recommends[\s\S]*"\$\{packages\[@\]\}"/);
assert.doesNotMatch(workflow, /packages\+=\((?:nodejs|npm)\)|apt-get install[^\n]*(?:nodejs|npm)/);
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, 2);
assert.equal((workflow.match(/NODE_TOOL_IMAGE: node:22-bookworm-slim/g) ?? []).length, 2);
assert.equal((workflow.match(/timeout 180 docker pull "\$NODE_TOOL_SOURCE_IMAGE"/g) ?? []).length, 2);
assert.equal((workflow.match(/docker tag "\$NODE_TOOL_SOURCE_IMAGE" "\$NODE_TOOL_IMAGE"/g) ?? []).length, 2);
assert.equal((workflow.match(/cat > "\$tool_dir\/node" <<'EOF'/g) ?? []).length, 2);
assert.equal((workflow.match(/--volume "\$workdir:\$workdir"/g) ?? []).length, 2);
assert.equal((workflow.match(/--workdir "\$workdir"/g) ?? []).length, 2);
assert.equal((workflow.match(/ln -s node "\$tool_dir\/npm"/g) ?? []).length, 2);
assert.equal((workflow.match(/>> "\$GITHUB_PATH"/g) ?? []).length, 2);
assert.match(workflow, /--volume \/var\/run\/docker\.sock:\/var\/run\/docker\.sock/);
assert.match(workflow, /--network host/);
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.equal((workflow.match(/timeout 180 docker pull "\$NODE_TOOL_SOURCE_IMAGE"/g) ?? []).length, 1);
assert.equal((workflow.match(/docker tag "\$NODE_TOOL_SOURCE_IMAGE" "\$NODE_TOOL_IMAGE"/g) ?? []).length, 1);
assert.equal((workflow.match(/cat > "\$tool_dir\/node" <<'EOF'/g) ?? []).length, 1);
assert.equal((workflow.match(/--volume "\$workdir:\$workdir"/g) ?? []).length, 1);
assert.equal((workflow.match(/--workdir "\$workdir"/g) ?? []).length, 1);
assert.equal((workflow.match(/ln -s node "\$tool_dir\/npm"/g) ?? []).length, 1);
assert.equal((workflow.match(/>> "\$GITHUB_PATH"/g) ?? []).length, 1);
assert.match(workflow, /node:22-bookworm-slim "\$\{0##\*\/\}" "\$@"/);
assert.doesNotMatch(workflow, /(?:--volume|-v)[^\n]*(?:\$HOME\/\.docker|DOCKER_CONFIG)/);
assert.match(workflow, /node --version[\s\S]*npm --version/);
assert.match(workflow, /name: Verify runner Node tooling[\s\S]*node --version[\s\S]*npm --version/);
assert.match(workflow, /docker compose version --short/);
assert.match(workflow, /docker compose --help \| grep -q -- '--project-name'/);
assert.match(