mirror of
https://github.com/Matysh/houseplan-card
synced 2026-09-29 03:09:36 +00:00
fix: accept skipped prerelease announcement
Validate / hacs (push) Failing after 14s
Validate / hassfest (push) Failing after 11s
Validate / frontend (push) Successful in 4m0s
Validate / backend (push) Failing after 5m37s
Validate / smoke (push) Failing after 2m25s
Validate / golden (push) Failing after 2m23s
Validate / performance_smoke (push) Failing after 35m49s
Validate / hacs (push) Failing after 14s
Validate / hassfest (push) Failing after 11s
Validate / frontend (push) Successful in 4m0s
Validate / backend (push) Failing after 5m37s
Validate / smoke (push) Failing after 2m25s
Validate / golden (push) Failing after 2m23s
Validate / performance_smoke (push) Failing after 35m49s
This commit is contained in:
@@ -72,6 +72,12 @@ export function verifyReleaseProjection(release, { tag }) {
|
||||
return release;
|
||||
}
|
||||
|
||||
/** Telegram announcements are deliberately skipped for prereleases. */
|
||||
export function prereleaseWorkflowSucceeded(label, conclusion) {
|
||||
return conclusion === 'success'
|
||||
|| (label === 'Announce release' && conclusion === 'skipped');
|
||||
}
|
||||
|
||||
/**
|
||||
* Read selected root entries from an ordinary ZIP archive without relying on
|
||||
* platform-specific `tar`/`unzip` executables. GitHub runners, Git Bash, WSL
|
||||
@@ -339,7 +345,8 @@ if (invokedDirectly) {
|
||||
if (state !== last) console.log(`${label}: ${state} ${row.url}`);
|
||||
last = state;
|
||||
if (row.status === 'completed') {
|
||||
if (row.conclusion !== 'success') throw new Error(`${label} concluded ${row.conclusion}: ${row.url}`);
|
||||
if (!prereleaseWorkflowSucceeded(label, row.conclusion))
|
||||
throw new Error(`${label} concluded ${row.conclusion}: ${row.url}`);
|
||||
return row;
|
||||
}
|
||||
await sleep(10_000);
|
||||
|
||||
@@ -15,7 +15,8 @@ import {
|
||||
versionFromTag,
|
||||
} from '../scripts/release-contract.mjs';
|
||||
import {
|
||||
parseIssueList, parsePrereleaseArgs, readZipEntries, verifyReleaseProjection,
|
||||
parseIssueList, parsePrereleaseArgs, prereleaseWorkflowSucceeded,
|
||||
readZipEntries, verifyReleaseProjection,
|
||||
} from '../scripts/release-prerelease.mjs';
|
||||
|
||||
const repo = 'Matysh/houseplan-card';
|
||||
@@ -129,6 +130,10 @@ test('local orchestrator validates issue lists and public release assets', () =>
|
||||
() => verifyReleaseProjection({ ...release, assets: release.assets.slice(0, 1) }, { tag }),
|
||||
/houseplan\.zip/,
|
||||
);
|
||||
assert.equal(prereleaseWorkflowSucceeded('Release', 'success'), true);
|
||||
assert.equal(prereleaseWorkflowSucceeded('Announce release', 'skipped'), true);
|
||||
assert.equal(prereleaseWorkflowSucceeded('Release', 'skipped'), false);
|
||||
assert.equal(prereleaseWorkflowSucceeded('Announce release', 'failure'), false);
|
||||
});
|
||||
|
||||
test('release ZIP inspection is portable and does not depend on tar', () => {
|
||||
|
||||
Reference in New Issue
Block a user