Run integration tests on runner tooling
This commit is contained in:
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user