Add repeated early battle QA reporting

This commit is contained in:
2026-07-05 20:42:40 +09:00
parent 5fbfada47a
commit df74caac17
4 changed files with 179 additions and 3 deletions

View File

@@ -6,11 +6,19 @@ const qaVersion = process.env.PUBLIC_QA_VERSION ?? makeQaVersion();
const releaseCommit = gitValue(['rev-parse', 'HEAD'], 'unknown');
const releaseShortCommit = gitValue(['rev-parse', '--short', 'HEAD'], 'unknown');
const qaReportFile = 'qa-early-report.json';
const qaRepeatReportFile = 'qa-early-repeat-report.json';
const qaRepeatRuns = Number(process.env.PUBLIC_QA_REPEAT_RUNS ?? 2);
assertNoTrackedChanges();
runPnpmScript('verify:local-release');
runPnpmScript('qa:early', { QA_REPORT_PATH: join('dist', qaReportFile) });
writeReleaseManifest(qaVersion, releaseCommit, releaseShortCommit, qaReportFile);
if (qaRepeatRuns > 1) {
runPnpmScript('qa:early:repeat', {
QA_REPEAT_RUNS: String(qaRepeatRuns),
QA_REPEAT_REPORT_PATH: join('dist', qaRepeatReportFile)
});
}
writeReleaseManifest(qaVersion, releaseCommit, releaseShortCommit, qaReportFile, qaRepeatRuns > 1 ? qaRepeatReportFile : undefined);
runPnpmScript('deploy:nas:dist');
runPnpmScript('verify:public-deploy', { PUBLIC_QA_VERSION: qaVersion, PUBLIC_QA_COMMIT: releaseCommit });
@@ -36,7 +44,7 @@ function assertNoTrackedChanges() {
}
}
function writeReleaseManifest(qaVersion, commit, shortCommit, qaReport) {
function writeReleaseManifest(qaVersion, commit, shortCommit, qaReport, qaRepeatReport) {
const manifest = {
app: 'heros_web',
qaVersion,
@@ -45,7 +53,8 @@ function writeReleaseManifest(qaVersion, commit, shortCommit, qaReport) {
branch: gitValue(['branch', '--show-current'], 'unknown'),
generatedAt: new Date().toISOString(),
qaReport,
verification: ['verify:local-release', 'qa:early', 'verify:public-deploy']
qaRepeatReport,
verification: ['verify:local-release', 'qa:early', ...(qaRepeatReport ? ['qa:early:repeat'] : []), 'verify:public-deploy']
};
mkdirSync('dist', { recursive: true });