ci: add review agent generation step to build and CI
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
parent
4054ae9f4b
commit
3beeaa545e
9
.github/workflows/ci.yml
vendored
9
.github/workflows/ci.yml
vendored
|
|
@ -31,6 +31,15 @@ jobs:
|
|||
CLAUDE_CODE_SKIP_CHROME_MCP_SETUP: "1"
|
||||
run: bun install --frozen-lockfile
|
||||
|
||||
- name: Setup SSH for review agent generation
|
||||
uses: webfactory/ssh-agent@v0.9.0
|
||||
with:
|
||||
ssh-private-key: ${{ secrets.CO_STRICT_REVIEW_SSH_KEY }}
|
||||
|
||||
- name: Generate review builtin files
|
||||
run: bun run scripts/generate-review-builtin.ts
|
||||
continue-on-error: true
|
||||
|
||||
- name: Type check
|
||||
run: bun run typecheck
|
||||
|
||||
|
|
|
|||
11
build.ts
11
build.ts
|
|
@ -8,6 +8,17 @@ const outdir = 'dist'
|
|||
const { rmSync } = await import('fs')
|
||||
rmSync(outdir, { recursive: true, force: true })
|
||||
|
||||
// Step 1.5: Generate review builtin files
|
||||
console.log('Generating review builtin files...')
|
||||
const { spawnSync: genSpawnSync } = await import('child_process')
|
||||
const genResult = genSpawnSync('bun', ['run', 'scripts/generate-review-builtin.ts'], {
|
||||
stdio: 'inherit',
|
||||
cwd: import.meta.dir?.replace(/[^/\\]*$/, '') || '.',
|
||||
})
|
||||
if (genResult.status !== 0) {
|
||||
console.warn('Warning: generate-review-builtin.ts failed, using existing files')
|
||||
}
|
||||
|
||||
// Collect FEATURE_* env vars → Bun.build features
|
||||
const envFeatures = Object.keys(process.env)
|
||||
.filter(k => k.startsWith('FEATURE_'))
|
||||
|
|
|
|||
|
|
@ -51,6 +51,16 @@ const inspectArgs = process.env.BUN_INSPECT
|
|||
// npm, etc.) and on all platforms.
|
||||
const bunCmd = process.execPath;
|
||||
|
||||
// Generate review builtin files before dev launch
|
||||
console.log('[dev] Generating review builtin files...');
|
||||
const genResult = Bun.spawnSync(['bun', 'run', 'scripts/generate-review-builtin.ts'], {
|
||||
stdio: 'inherit',
|
||||
cwd: projectRoot,
|
||||
});
|
||||
if (!genResult.success) {
|
||||
console.warn('[dev] Warning: generate-review-builtin.ts failed, using existing files');
|
||||
}
|
||||
|
||||
const result = Bun.spawnSync(
|
||||
[bunCmd, ...inspectArgs, "run", ...defineArgs, ...featureArgs, cliPath, ...process.argv.slice(2)],
|
||||
{
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user