ci(repo): gate PR tests behind dispatch, label, or changeset#199
Conversation
Run the integration test suite in pr.yaml only when the run is dispatched manually, the PR carries a `test` label, or the PR adds a changeset; otherwise skip it while lint/build/publint still gate every PR. This keeps the pipeline short on PRs that don't need the full suite. Add workflow_dispatch and a concurrency group that cancels superseded runs. Also skip the fork merge/rebase integration suite by default (it creates buckets, forks, and waits out consistency, which adds noticeable time to the pipeline), gated behind RUN_FORK_INTEGRATION_TESTS=true via a new shouldSkipForkTests() helper. Assisted-by: Opus 4.8 via Claude Code
Greptile SummaryThis PR makes integration testing conditional and adds a separate opt-in for fork tests. The main changes are:
Confidence Score: 4/5Manual runs can test the wrong ref, and automated workflows no longer exercise fork integration paths.
.github/workflows/pr.yaml and packages/storage/src/test/setup.ts Important Files Changed
Reviews (1): Last reviewed commit: "ci(repo): gate PR tests behind dispatch,..." | Re-trigger Greptile |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 3 potential issues.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Want higher recall? High effort reviews run extra passes and find more bugs. A team admin can switch effort levels in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit c98d2ff. Configure here.

What
Makes the integration test suite in
pr.yamlconditional so it doesn't run on every PR push, keeping the pipeline short when the full suite isn't needed.The test suite now runs when any of these is true:
workflow_dispatch),testlabel, orOtherwise it's skipped. The cheap checks (lint / build / publint) still gate every PR, and the
checksjob always reports its status, so branch protection is unaffected.Also
workflow_dispatchtrigger + a concurrency group that cancels superseded runs on the same PR/branch.RUN_FORK_INTEGRATION_TESTS=true, via a newshouldSkipForkTests()helper inpackages/storage/src/test/setup.ts.Notes / follow-ups
testlabel to exist in the repo (create it in repo Settings → Labels, orgh label create test).secrets.*, so atest-labeled fork PR would fail the test step — pre-existing behavior, flagged for awareness. Can add a same-repo guard if we take external PRs.release.yamlstill runs the full suite on merge tomain, so nothing ships untested.Test
1 skipped (1),6 skipped (6), zero network calls.biome checkclean.🤖 Generated with Claude Code
Note
Medium Risk
CI gating reduces how often integration tests run on PRs and excludes fork tests by default even when tests execute, which shifts reliance to manual/
test/changeset triggers and release workflow unlessRUN_FORK_INTEGRATION_TESTSis set elsewhere.Overview
PR workflow no longer runs the integration test step on every push. Lint, build, and publint still run on every PR. Run tests only when the workflow is manually dispatched, the PR has a
testlabel (including re-runs onlabeled), or the branch includes a changeset.mdunder.changeset/. A gate step records the decision in the job summary; the test step is conditional so skipped runs still leave the checks job green for branch protection.Also adds
workflow_dispatch, concurrency with cancel-in-progress for superseded runs, and a jobifso unrelated label events do not re-run the whole job.Storage tests: fork merge/rebase integration now uses
shouldSkipForkTests(), which skips unlessRUN_FORK_INTEGRATION_TESTS=true(in addition to the usual Tigris env vars). When PR tests do run, that suite stays off by default to shorten the pipeline.Reviewed by Cursor Bugbot for commit c98d2ff. Bugbot is set up for automated code reviews on this repo. Configure here.