Skip to content

feat(cli): scaffold .github/workflows/ci.yml in junior init#391

Merged
dcramer merged 6 commits into
mainfrom
jr/scaffold-ci-workflow
May 21, 2026
Merged

feat(cli): scaffold .github/workflows/ci.yml in junior init#391
dcramer merged 6 commits into
mainfrom
jr/scaffold-ci-workflow

Conversation

@sentry-junior
Copy link
Copy Markdown
Contributor

@sentry-junior sentry-junior Bot commented May 21, 2026

junior init now scaffolds a .github/workflows/ci.yml so new Junior apps ship with CI validation out of the box.

Scaffolded Workflow

The generated workflow runs on push to main and on pull requests with steps: checkout, pnpm 10 setup, Node 24, pnpm install --frozen-lockfile, pnpm check (validates skills, plugins, and app structure), and pnpm build.

pnpm versioning

pnpm version is declared via pnpm/action-setup's version: 10 input rather than a packageManager field in package.json. Scaffolded projects don't actively maintain a version pin, so packageManager would go stale immediately. Users who want corepack pinning can add it themselves when ready.

Fixes #390

Add writeGitHubWorkflow() to the init scaffolder so new Junior apps
get a basic CI workflow out of the box. The workflow runs on push to
main and on pull requests, installing deps, running `pnpm check`
(junior check), and `pnpm build`.

Closes #390

Co-Authored-By: Claude (anthropic/claude-opus-4.6) <[email protected]>
@vercel
Copy link
Copy Markdown

vercel Bot commented May 21, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
junior-docs Ready Ready Preview, Comment May 21, 2026 4:35am

Request Review

Co-Authored-By: Claude (anthropic/claude-opus-4.6) <[email protected]>
actions/checkout@v6, actions/setup-node@v6, pnpm/action-setup@v6

Co-Authored-By: Claude (anthropic/claude-opus-4.6) <[email protected]>
Comment thread packages/junior/src/cli/init.ts
pnpm/action-setup requires either a version input or a packageManager
field in package.json. Without it, CI fails on first run.

Co-Authored-By: Claude (anthropic/claude-opus-4.6) <[email protected]>
Copy link
Copy Markdown

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 284c0e8. Configure here.

Comment thread packages/junior/src/cli/init.ts Outdated
sentry-junior Bot and others added 2 commits May 21, 2026 04:31
corepack rejects bare major versions like 'pnpm@10' — it requires
exact semver. Use '[email protected]' as the scaffold baseline; users
can run 'corepack use pnpm@latest' to update.

Add regression test asserting packageManager matches exact semver.

Co-Authored-By: Claude (anthropic/claude-opus-4.6) <[email protected]>
Scaffolded projects don't actively maintain a packageManager pin, so
it goes stale immediately. Instead, let pnpm/action-setup resolve the
latest pnpm 10.x via its version input. Users who want corepack
pinning can add packageManager themselves when ready.

Co-Authored-By: Claude (anthropic/claude-opus-4.6) <[email protected]>
@dcramer dcramer merged commit 5ed5a05 into main May 21, 2026
16 checks passed
@dcramer dcramer deleted the jr/scaffold-ci-workflow branch May 21, 2026 04:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

junior init: scaffold .github/workflows CI with build + check

1 participant