Make release check CI self-contained
This commit is contained in:
@@ -31,6 +31,6 @@ jobs:
|
|||||||
npm --version
|
npm --version
|
||||||
python3 --version
|
python3 --version
|
||||||
- name: Run post-run report smoke
|
- name: Run post-run report smoke
|
||||||
run: npm run postrun -- --run-id ci-postrun --since-days 30 --quiet
|
run: npm run postrun -- --run-id ci-postrun --since-days 30 --reports "$RUNNER_TEMP/mnemazine-postrun" --quiet
|
||||||
- name: Run release gate (syntax, demo smoke, public scan, bilingual README parity)
|
- name: Run release gate (syntax, demo smoke, public scan, bilingual README parity)
|
||||||
run: npm run release-check
|
run: npm run release-check
|
||||||
|
|||||||
@@ -142,10 +142,43 @@ async function demoSmoke() {
|
|||||||
async function qualityAndPublicChecks() {
|
async function qualityAndPublicChecks() {
|
||||||
await must('demo vault quality', 'npm', ['run', 'quality', '--', '--vault', 'demo/vault'])
|
await must('demo vault quality', 'npm', ['run', 'quality', '--', '--vault', 'demo/vault'])
|
||||||
await reportQualityGateSmoke()
|
await reportQualityGateSmoke()
|
||||||
await must('complete gate smoke', 'npm', ['run', 'complete'])
|
await completeGateSmoke()
|
||||||
await must('public release scan', 'npm', ['run', 'public-check'])
|
await must('public release scan', 'npm', ['run', 'public-check'])
|
||||||
}
|
}
|
||||||
|
|
||||||
|
async function completeGateSmoke() {
|
||||||
|
const temp = await fs.mkdtemp(path.join(os.tmpdir(), 'mnemazine-complete-gate-'))
|
||||||
|
const inbox = path.join(temp, 'inbox')
|
||||||
|
const reports = path.join(temp, 'reports')
|
||||||
|
const state = path.join(temp, 'state')
|
||||||
|
await fs.mkdir(inbox, { recursive: true })
|
||||||
|
await fs.mkdir(reports, { recursive: true })
|
||||||
|
await fs.mkdir(state, { recursive: true })
|
||||||
|
await fs.writeFile(path.join(reports, 'complete-smoke.html'), [
|
||||||
|
'<!doctype html><html><body>',
|
||||||
|
'<main data-knowledge-atom="complete-smoke">',
|
||||||
|
'<h1>Синтезированные знания</h1>',
|
||||||
|
'<section><h2>Синтез</h2><p>Проверенная идея после обработки.</p></section>',
|
||||||
|
'<section><h2>Источники</h2>',
|
||||||
|
'<a href="https://example.com/source-a">source a</a>',
|
||||||
|
'<a href="https://example.com/source-b">source b</a>',
|
||||||
|
'<a href="https://example.com/source-c">source c</a></section>',
|
||||||
|
'<section><h2>Где применить</h2><p>В пайплайне.</p></section>',
|
||||||
|
'<section><h2>Проверка и риск</h2><p>Проверить источники.</p></section>',
|
||||||
|
'<section><h2>Следующее действие</h2><p>Запустить gate.</p></section>',
|
||||||
|
'</main></body></html>'
|
||||||
|
].join(''), 'utf8')
|
||||||
|
await fs.writeFile(path.join(state, 'last-action-brief.md'), '# Complete Gate Smoke\n\n- Next action: keep release gate green.\n', 'utf8')
|
||||||
|
await must('complete gate smoke', process.execPath, ['scripts/mnemazine-complete-check.mjs'], {
|
||||||
|
env: {
|
||||||
|
MNEMAZINE_VAULT: path.join(ROOT, 'demo/vault'),
|
||||||
|
MNEMAZINE_INBOX: inbox,
|
||||||
|
MNEMAZINE_REPORTS: reports,
|
||||||
|
MNEMAZINE_STATE: state
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
async function reportQualityGateSmoke() {
|
async function reportQualityGateSmoke() {
|
||||||
const temp = await fs.mkdtemp(path.join(os.tmpdir(), 'mnemazine-report-gate-'))
|
const temp = await fs.mkdtemp(path.join(os.tmpdir(), 'mnemazine-report-gate-'))
|
||||||
const raw = path.join(temp, 'raw.html')
|
const raw = path.join(temp, 'raw.html')
|
||||||
|
|||||||
Reference in New Issue
Block a user