Publish release QA dashboard
This commit is contained in:
@@ -134,6 +134,12 @@ try {
|
||||
);
|
||||
console.log(`Verified QA repeat report ${releaseManifest.qaRepeatReport} with ${qaRepeatReport.runs.length} runs`);
|
||||
}
|
||||
if (releaseManifest.releaseDashboard) {
|
||||
const dashboard = await readTextAsset(targetUrl, releaseManifest.releaseDashboard);
|
||||
assert(dashboard.includes('Heros Web Release QA'), `Expected deployed release dashboard title: ${dashboard.slice(0, 200)}`);
|
||||
assert(dashboard.includes(releaseManifest.shortCommit ?? releaseManifest.commit), `Expected deployed release dashboard commit: ${dashboard.slice(0, 400)}`);
|
||||
console.log(`Verified release dashboard ${releaseManifest.releaseDashboard}`);
|
||||
}
|
||||
|
||||
const relevantLogs = consoleMessages.filter(
|
||||
(message) => message.type === 'error' || (isWarning(message.type) && relevantLogPattern.test(message.text))
|
||||
@@ -173,6 +179,14 @@ async function readJsonAsset(pageUrl, assetPath) {
|
||||
return response.json();
|
||||
}
|
||||
|
||||
async function readTextAsset(pageUrl, assetPath) {
|
||||
const assetUrl = new URL(assetPath, pageUrl);
|
||||
assetUrl.searchParams.set('v', expectedQaVersion ?? String(Date.now()));
|
||||
const response = await fetch(assetUrl, { signal: AbortSignal.timeout(90000) });
|
||||
assert(response.ok, `Expected deployed text asset at ${assetUrl.href}: ${response.status} ${response.statusText}`);
|
||||
return response.text();
|
||||
}
|
||||
|
||||
function assert(condition, message) {
|
||||
if (!condition) {
|
||||
throw new Error(message);
|
||||
|
||||
Reference in New Issue
Block a user