Files
rea/.github/workflows/ci.yml
T
N0zoM1z0andKaoru0822 43303502e3 chore(ci): verify native Windows ESM fixture loading and full acceptance file
Diagnostic workflow only. Compare the unchanged raw-drive baseline error with the current complete CLI/MCP acceptance file, requiring matching source and fresh exact reports.

Co-authored-by: Kaoru0822 <208281322+kaoru0822-kitauji@users.noreply.github.com>
2026-10-15 16:00:12 +00:00

122 lines
6.2 KiB
YAML

name: Native Windows application fixture verification
on:
workflow_dispatch:
permissions:
contents: read
concurrency:
group: native-windows-fixture-proof-${{ github.ref }}
cancel-in-progress: false
env:
HUSKY: "0"
NODE_OPTIONS: --max-old-space-size=1536
PROOF_SOURCE: 011be9c3d51a546fa6616145173e4c77b2d103f0
PROOF_BASE: 5b16f2431062eea6ffd245a9e05512790007cb13
jobs:
native-build:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020
with:
node-version-file: .nvmrc
- name: Prepare cross compiler
run: |
for source in /etc/apt/apt-mirrors.txt /etc/apt/sources.list /etc/apt/sources.list.d/ubuntu.sources; do
if [ -f "$source" ]; then
sudo sed -i 's|azure.archive.ubuntu.com|archive.ubuntu.com|g; s|http://archive.ubuntu.com|https://archive.ubuntu.com|g' "$source"
fi
done
sudo apt-get update
sudo apt-get install --no-install-recommends -y g++-mingw-w64-x86-64
- run: npm run build:windows-native
- run: npm run verify:windows-native:artifact
- uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02
with:
name: windows-native-controls
path: native/windows/build/
if-no-files-found: error
retention-days: 7
windows-proof:
needs: native-build
runs-on: windows-latest
timeout-minutes: 20
defaults:
run:
shell: bash
steps:
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262
with:
fetch-depth: 0
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020
with:
node-version-file: .nvmrc
- uses: ./.github/actions/npm-cache
- run: npm ci
- uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093
with:
name: windows-native-controls
path: native/windows/build/
- run: npm run verify:windows-native:artifact
- run: npm run build:cached
- name: Observe actual baseline failure and corrected public CLI workflows
run: |
node --input-type=module - <<'JS'
import assert from "node:assert/strict";
import { readFileSync, writeFileSync, mkdirSync, rmSync } from "node:fs";
import { execFileSync, spawnSync } from "node:child_process";
import { resolve } from "node:path";
assert.equal(process.platform, "win32");
const source = process.env.PROOF_SOURCE;
const base = process.env.PROOF_BASE;
assert.equal(execFileSync("git", ["diff", "--name-only", source, "HEAD"], { encoding: "utf8" }).trim(), ".github/workflows/ci.yml");
execFileSync("git", ["diff", "--exit-code", "HEAD", "--"]);
const path = "tests/acceptance/applications/applicationWorkflowCli.test.ts";
const candidate = readFileSync(path, "utf8");
const baseline = execFileSync("git", ["show", `${base}:${path}`], { encoding: "utf8" });
const targets = "compares captured primitives and source values after aliases are replaced";
mkdirSync(".cache/windows-proof", { recursive: true });
const run = (name, pattern) => {
const output = `.cache/windows-proof/${name}.json`;
rmSync(output, { force: true });
const started = performance.now();
const child = spawnSync(process.execPath, [resolve("node_modules/vitest/vitest.mjs"), "run", "--project=acceptance", path, "--maxWorkers=1", "--coverage.enabled=false", `--testNamePattern=${pattern}`, "--reporter=json", `--outputFile=${output}`], { encoding: "utf8", maxBuffer: 8 * 1024 * 1024 });
if (child.error) throw child.error;
const log = `${child.stdout}\n${child.stderr}`;
writeFileSync(`.cache/windows-proof/${name}.log`, log);
const report = JSON.parse(readFileSync(output, "utf8"));
return { exit: child.status, elapsed_ms: performance.now() - started, report, log };
};
let failed;
try {
writeFileSync(path, baseline);
failed = run("baseline", targets);
assert.equal(failed.exit, 1);
assert.equal(failed.report.numFailedTests, 1);
assert.equal(failed.report.numPassedTests, 0);
const failures = failed.report.testResults.flatMap((suite) => suite.assertionResults).filter((test) => test.status === "failed");
assert.equal(failures.length, 1);
for (const test of failures) assert.match(test.failureMessages.join("\n"), /ERR_UNSUPPORTED_ESM_URL_SCHEME/);
} finally {
writeFileSync(path, candidate);
}
const fixed = run("candidate", ".*");
assert.equal(fixed.exit, 0);
assert.equal(fixed.report.numPassedTests, 34);
assert.equal(fixed.report.numFailedTests, 0);
assert.equal(fixed.report.numPendingTests, 0);
assert.equal(fixed.report.testResults.length, 1);
execFileSync("git", ["diff", "--exit-code", "HEAD", "--"]);
const receipt = { source, base, platform: process.platform, architecture: process.arch, node: process.version, baseline_failed: failed.report.numFailedTests, baseline_import_error: "ERR_UNSUPPORTED_ESM_URL_SCHEME", baseline_elapsed_ms: failed.elapsed_ms, candidate_passed: fixed.report.numPassedTests, candidate_elapsed_ms: fixed.elapsed_ms, selected_skips: fixed.report.numPendingTests, instrumentation: "Unmodified baseline source; original ESM loader error verified in structured failure messages. Candidate source restored and checked before completion." };
writeFileSync(".cache/windows-proof/receipt.json", JSON.stringify(receipt, null, 2));
console.log(JSON.stringify(receipt));
JS
- uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02
if: always()
with:
name: native-windows-fixture-proof
path: .cache/windows-proof/
include-hidden-files: true
if-no-files-found: error
retention-days: 7