Run typecheck, tests, and build on pull requests - #12
Merged
Merged
Conversation
release.yml only triggers on push to main, so yarn test ran after a merge had already landed rather than before. A broken commit was caught only once it was on main and mid-publish, which is how the failed run for "chore: version packages" (#8) surfaced. This adds a CI workflow on pull_request so the same checks gate the merge instead of trailing it. It also runs yarn build, which prepack invokes at publish time: a build break would otherwise stay invisible until the release run. Concurrency is scoped per ref with cancel-in-progress, so a new push to a PR supersedes the run it obsoletes. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
|
Note Currently processing new changes in this PR. This may take a few minutes, please wait... ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (1)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
release.ymltriggers only onpushtomain, soyarn testruns after a merge has already landed. Pull requests get no test CI at all — currently only CodeRabbit reports a status. A broken commit is caught once it is onmainand mid-publish, which is how the failed run forchore: version packages(#8) surfaced.Change
Adds
.github/workflows/ci.yml, triggered onpull_request:yarn typecheckyarn testyarn buildyarn buildis included becauseprepackinvokes it at publish time — a build break would otherwise stay invisible until the release run, after merge.Notes:
permissions: contents: read— least privilege; this job needs nothing else.concurrencyis scoped per ref withcancel-in-progress, so a new push to a PR supersedes the run it obsoletes.pull_requestonly, notpush: main.release.ymlalready runs the tests onmain, so adding it here would duplicate every post-merge run.Enabling branch protection
To make this a required check, the context name to select is
Typecheck, test, build(the job'sname:, not the job idverify).No changeset
Intentionally omitted. This touches CI only and changes nothing in the published package, so it is not a releasable change under AGENTS.md. Adding one would trigger a version bump and an empty release.
🤖 Generated with Claude Code
Summary by CodeRabbit