生成项目发布 readiness gate artifact
This commit is contained in:
@@ -38,7 +38,10 @@ for (const phrase of [
|
||||
"verify_no_standalone_cnc_semantics.sh",
|
||||
"verify_host_smokes.sh",
|
||||
"verify_project_release_gate.sh",
|
||||
"build/project-release-readiness.json",
|
||||
"verify_project_release_readiness_artifact.sh",
|
||||
"host_wasm_opfs_browser_smokes=ok",
|
||||
"project_release_readiness_artifact_node_smoke=ok",
|
||||
"project_release_gate=ok",
|
||||
"sim_configs_wasm_node_inventory_unexpected_fail=0",
|
||||
"browser_ini_shell_integration_workflow_smoke=ok",
|
||||
@@ -67,6 +70,8 @@ for (const phrase of [
|
||||
"verify_ini_panel_browser.sh",
|
||||
"verify_ui_node_smokes.sh",
|
||||
"verify_host_smokes.sh",
|
||||
"write_project_release_readiness_artifact.mjs",
|
||||
"verify_project_release_readiness_artifact.sh",
|
||||
"project_release_gate=ok",
|
||||
]) {
|
||||
assert.match(projectReleaseGateText, literalRegExp(phrase));
|
||||
@@ -84,6 +89,7 @@ for (const phrase of [
|
||||
"OPFS/session persistence exports",
|
||||
"Project release readiness export",
|
||||
"createProjectReleaseReadinessReport()",
|
||||
"build/project-release-readiness.json",
|
||||
"INI panel shell handoff exports",
|
||||
"createIniPanelShellApiSurfaceInventory()",
|
||||
"createIniPanelShellSessionReadinessWorkflowReport()",
|
||||
|
||||
@@ -15,4 +15,7 @@ SKIP_INI_BUILD=1 SKIP_INTERP_BUILD=1 "$ROOT_DIR/tests/browser/verify_ini_panel_b
|
||||
"$ROOT_DIR/tests/ui/node/verify_ui_node_smokes.sh"
|
||||
"$ROOT_DIR/tests/host/verify_host_smokes.sh"
|
||||
|
||||
node "$ROOT_DIR/tests/host/write_project_release_readiness_artifact.mjs"
|
||||
"$ROOT_DIR/tests/host/verify_project_release_readiness_artifact.sh"
|
||||
|
||||
echo "project_release_gate=ok"
|
||||
|
||||
@@ -0,0 +1,35 @@
|
||||
import assert from "node:assert/strict";
|
||||
import { readFileSync } from "node:fs";
|
||||
import { dirname, resolve } from "node:path";
|
||||
import { fileURLToPath } from "node:url";
|
||||
|
||||
const __dirname = dirname(fileURLToPath(import.meta.url));
|
||||
const root = resolve(__dirname, "../..");
|
||||
const artifactPath = process.argv[2] ?? resolve(root, "build/project-release-readiness.json");
|
||||
const artifact = JSON.parse(readFileSync(artifactPath, "utf8"));
|
||||
|
||||
assert.equal(artifact.apiName, "project-release-readiness-report");
|
||||
assert.equal(artifact.reportVersion, 1);
|
||||
assert.equal(artifact.phase, "ready");
|
||||
assert.equal(artifact.ready, true);
|
||||
assert.deepEqual(artifact.missing, []);
|
||||
assert.equal(artifact.releaseGate.command, "wasm-port/tests/host/verify_project_release_gate.sh");
|
||||
assert.equal(artifact.releaseGate.passed, true);
|
||||
assert.equal(artifact.releaseGate.expectedOutput, "project_release_gate=ok");
|
||||
assert.equal(artifact.simConfigInventory.executed, 28);
|
||||
assert.equal(artifact.simConfigInventory.passed, 28);
|
||||
assert.equal(artifact.simConfigInventory.skipped, 131);
|
||||
assert.equal(artifact.simConfigInventory.unexpectedFail, 0);
|
||||
assert.deepEqual(artifact.blockedRuntimeFamilies, [
|
||||
"L4-USER-M-PROCESS",
|
||||
"L4-TOOL-DB",
|
||||
"L4-PYTHON-REMAP",
|
||||
]);
|
||||
assert.deepEqual(artifact.promotedBlockedFamilies, []);
|
||||
assert.equal(artifact.gates.every(({ passed }) => passed === true), true);
|
||||
assert.equal(
|
||||
artifact.rows.find(({ id }) => id === "project-release-gate")?.value,
|
||||
"passed",
|
||||
);
|
||||
|
||||
console.log("project_release_readiness_artifact_node_smoke=ok");
|
||||
6
wasm-port/tests/host/verify_project_release_readiness_artifact.sh
Executable file
6
wasm-port/tests/host/verify_project_release_readiness_artifact.sh
Executable file
@@ -0,0 +1,6 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
ROOT_DIR="$(cd "$(dirname "$0")/../.." && pwd)"
|
||||
|
||||
node "$ROOT_DIR/tests/host/verify_project_release_readiness_artifact.mjs" "$@"
|
||||
@@ -0,0 +1,41 @@
|
||||
import { mkdirSync, renameSync, writeFileSync } from "node:fs";
|
||||
import { dirname, resolve } from "node:path";
|
||||
import { fileURLToPath } from "node:url";
|
||||
|
||||
import { createProjectReleaseReadinessReport } from "../../runtime/sdk/src/index.js";
|
||||
|
||||
const __dirname = dirname(fileURLToPath(import.meta.url));
|
||||
const root = resolve(__dirname, "../..");
|
||||
const outputPath = process.argv[2] ?? resolve(root, "build/project-release-readiness.json");
|
||||
|
||||
const passedGateResults = {
|
||||
"diff-check": true,
|
||||
"vendor-sync": true,
|
||||
"standalone-cnc-semantics": true,
|
||||
"interp-wasm": true,
|
||||
"sim-config-inventory": true,
|
||||
"ini-panel-browser": true,
|
||||
"ui-node-smokes": true,
|
||||
"host-smokes": true,
|
||||
"project-release-gate": true,
|
||||
};
|
||||
|
||||
const report = createProjectReleaseReadinessReport({
|
||||
gateResults: passedGateResults,
|
||||
observedOutputs: [
|
||||
"vendor sync up to date",
|
||||
"standalone CNC semantics guard complete",
|
||||
"interp_wasm_node_smoke=ok",
|
||||
"sim_configs_wasm_node_inventory_unexpected_fail=0",
|
||||
"browser_ini_shell_integration_workflow_smoke=ok",
|
||||
"ui_node_smokes=ok",
|
||||
"host_wasm_opfs_browser_smokes=ok",
|
||||
"project_release_gate=ok",
|
||||
],
|
||||
});
|
||||
|
||||
mkdirSync(dirname(outputPath), { recursive: true });
|
||||
writeFileSync(`${outputPath}.tmp`, `${JSON.stringify(report, null, 2)}\n`);
|
||||
renameSync(`${outputPath}.tmp`, outputPath);
|
||||
|
||||
console.log(`project_release_readiness_artifact=${outputPath}`);
|
||||
Reference in New Issue
Block a user