mirror of
https://github.com/diegosouzapw/OmniRoute.git
synced 2026-08-08 00:02:20 +03:00
* fix(ci): publish electron-updater latest.yml manifests in release assets (#6766) * fix(ci): register new mutation-covering test + realign stale codex-cli version fixture - stryker.conf.json: add tests/unit/cliproxyapi-model-mapping-dispatch.test.ts to tap.testFiles so it counts toward mutation coverage for the newly-added comboContextCache.ts coverage (check:mutation-test-coverage --strict was failing). - tests/unit/provider-models-route-codex.test.ts: DEFAULT_CODEX_CLIENT_VERSION was bumped to 0.144.0 on release/v3.8.47 after this test's fixtures were written; realign the hardcoded 0.142.0 expectations to the current constant.
This commit is contained in:
committed by
GitHub
parent
47bc3317c1
commit
993f280c4b
7
.github/workflows/electron-release.yml
vendored
7
.github/workflows/electron-release.yml
vendored
@@ -201,6 +201,12 @@ jobs:
|
||||
[ -f "$file" ] && cp "$file" "../../release-assets/OmniRoute.exe" && break
|
||||
done
|
||||
fi
|
||||
# electron-updater manifests (latest.yml / latest-mac.yml / latest-linux.yml)
|
||||
# must be published alongside the installers, or autoUpdater fails with
|
||||
# "Cannot find latest.yml in the latest release artifacts" (#6766).
|
||||
for file in latest*.yml; do
|
||||
[ -f "$file" ] && cp "$file" ../../release-assets/
|
||||
done
|
||||
|
||||
- name: Upload artifacts
|
||||
uses: actions/upload-artifact@v7
|
||||
@@ -263,6 +269,7 @@ jobs:
|
||||
release-assets/*.AppImage
|
||||
release-assets/*.deb
|
||||
release-assets/*.blockmap
|
||||
release-assets/*.yml
|
||||
release-assets/*.source.tar.gz
|
||||
release-assets/*.source.zip
|
||||
env:
|
||||
|
||||
1
changelog.d/fixes/6766-6766-auto-update.md
Normal file
1
changelog.d/fixes/6766-6766-auto-update.md
Normal file
@@ -0,0 +1 @@
|
||||
- fix(ci): publish electron-updater `latest*.yml` manifests in electron release assets so auto-update can find them ([#6766](https://github.com/diegosouzapw/OmniRoute/issues/6766))
|
||||
@@ -106,6 +106,7 @@
|
||||
"tests/unit/claude-passthrough-stream-boolean.test.ts",
|
||||
"tests/unit/claude-passthrough-thinking-2454.test.ts",
|
||||
"tests/unit/cli-simulate.test.ts",
|
||||
"tests/unit/cliproxyapi-model-mapping-dispatch.test.ts",
|
||||
"tests/unit/cline-response-envelope.test.ts",
|
||||
"tests/unit/cliproxyapi-model-mapping-dispatch.test.ts",
|
||||
"tests/unit/clinepass-provider.test.ts",
|
||||
|
||||
78
tests/unit/build/electron-release-latest-yml.repro.test.ts
Normal file
78
tests/unit/build/electron-release-latest-yml.repro.test.ts
Normal file
@@ -0,0 +1,78 @@
|
||||
// Repro probe for issue #6766: "Auto-update failed: Cannot find latest.yml in the
|
||||
// latest release artifacts".
|
||||
//
|
||||
// electron-updater (used by electron/main.js via autoUpdater) fetches
|
||||
// latest.yml / latest-mac.yml / latest-linux.yml from the GitHub Release assets
|
||||
// to discover + verify the newest version. electron-builder generates those
|
||||
// files alongside the installers in electron/dist-electron/, but the release
|
||||
// workflow's "Collect installers" step only copies platform installer
|
||||
// extensions (*.exe, *.dmg, *.AppImage, *.deb) into release-assets/ — never
|
||||
// the *.yml manifests — so they never reach the GitHub Release, and
|
||||
// electron-updater fails with exactly the reported error.
|
||||
//
|
||||
// This test statically inspects .github/workflows/electron-release.yml and
|
||||
// proves the "Collect installers" step stages the yml manifests, and
|
||||
// that the "Create Release" files: list references them too.
|
||||
|
||||
import test from "node:test";
|
||||
import assert from "node:assert/strict";
|
||||
import fs from "node:fs";
|
||||
import path from "node:path";
|
||||
import { fileURLToPath } from "node:url";
|
||||
|
||||
const __dirname = path.dirname(fileURLToPath(import.meta.url));
|
||||
const WORKFLOW_PATH = path.resolve(
|
||||
__dirname,
|
||||
"../../../.github/workflows/electron-release.yml"
|
||||
);
|
||||
|
||||
function readWorkflow(): string {
|
||||
return fs.readFileSync(WORKFLOW_PATH, "utf8");
|
||||
}
|
||||
|
||||
function extractStep(yaml: string, stepName: string): string {
|
||||
const stepHeaderRe = new RegExp(`- name: ${stepName}\\n([\\s\\S]*?)(?=\\n\\s{6}- name:|\\n [a-zA-Z_-]+:\\n)`);
|
||||
const m = yaml.match(stepHeaderRe);
|
||||
assert.ok(m, `could not locate step "${stepName}" in ${WORKFLOW_PATH}`);
|
||||
return m![1];
|
||||
}
|
||||
|
||||
test("electron-release.yml: 'Collect installers' step stages latest*.yml manifests for electron-updater", () => {
|
||||
const yaml = readWorkflow();
|
||||
const collectStep = extractStep(yaml, "Collect installers");
|
||||
|
||||
// electron-builder writes latest.yml (win), latest-mac.yml, latest-linux.yml
|
||||
// next to the installers in electron/dist-electron/. Without staging them
|
||||
// into release-assets/, the GitHub Release never gets latest.yml and
|
||||
// electron-updater's autoUpdater fails with:
|
||||
// "Cannot find latest.yml in the latest release artifacts"
|
||||
const stagesYmlManifests =
|
||||
/\*\.yml/.test(collectStep) || /latest.*\.yml/.test(collectStep);
|
||||
|
||||
assert.ok(
|
||||
stagesYmlManifests,
|
||||
"BUG REPRODUCED: 'Collect installers' step does not copy *.yml (latest.yml / " +
|
||||
"latest-mac.yml / latest-linux.yml) from electron/dist-electron/ into " +
|
||||
"release-assets/, so electron-updater cannot find latest.yml in the " +
|
||||
"published GitHub Release (issue #6766).\n\nActual step body:\n" +
|
||||
collectStep
|
||||
);
|
||||
});
|
||||
|
||||
test("electron-release.yml: 'Create Release' files: list publishes the *.yml update manifests", () => {
|
||||
const yaml = readWorkflow();
|
||||
const createReleaseIdx = yaml.indexOf("name: Create Release");
|
||||
assert.ok(createReleaseIdx !== -1, "could not locate 'Create Release' step");
|
||||
const filesBlockIdx = yaml.indexOf("files: |", createReleaseIdx);
|
||||
assert.ok(filesBlockIdx !== -1, "could not locate files: block in 'Create Release' step");
|
||||
const nextStepOrEnvIdx = yaml.indexOf("\n env:", filesBlockIdx);
|
||||
const filesBlock = yaml.slice(filesBlockIdx, nextStepOrEnvIdx === -1 ? undefined : nextStepOrEnvIdx);
|
||||
|
||||
assert.ok(
|
||||
/release-assets\/\*\.yml/.test(filesBlock),
|
||||
"BUG REPRODUCED: 'Create Release' files: glob list does not include " +
|
||||
"release-assets/*.yml, so even if the manifests were staged they would " +
|
||||
"not be attached to the GitHub Release (issue #6766).\n\nActual files: block:\n" +
|
||||
filesBlock
|
||||
);
|
||||
});
|
||||
@@ -109,7 +109,7 @@ test("provider models route discovers live Codex models and preserves static ali
|
||||
display_name: "GPT 5.6 GitHub",
|
||||
visibility: "list",
|
||||
supported_in_api: true,
|
||||
minimal_client_version: "0.142.0",
|
||||
minimal_client_version: "0.144.0",
|
||||
context_window: 372000,
|
||||
input_modalities: ["text", "image"],
|
||||
supported_reasoning_levels: [{ effort: "low" }, { effort: "high" }],
|
||||
@@ -190,7 +190,7 @@ test("provider models route uses the GitHub Codex catalog when live discovery fa
|
||||
display_name: "GPT-5.6-Sol",
|
||||
visibility: "list",
|
||||
supported_in_api: true,
|
||||
minimal_client_version: "0.142.0",
|
||||
minimal_client_version: "0.144.0",
|
||||
context_window: 372000,
|
||||
},
|
||||
],
|
||||
|
||||
Reference in New Issue
Block a user