-
Notifications
You must be signed in to change notification settings - Fork 1
Block vercel deployment on test success #6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
WalkthroughTwo new GitHub Actions workflows were added for deploying preview and production builds to Vercel, each with jobs for testing and deployment. The existing test workflow's triggers were modified to remove automatic runs on pushes and pull requests, enabling invocation only via workflow calls or manual dispatch. Additionally, the Vercel configuration was updated to disable Git-based deployments explicitly. Changes
Sequence Diagram(s)Vercel Deployment Workflow (Preview or Production)sequenceDiagram
participant GitHub Actions
participant Test Job
participant Deploy Job
participant Vercel
GitHub Actions->>Test Job: Start test job (uses tests.yml)
Test Job-->>GitHub Actions: Report test result
GitHub Actions->>Deploy Job: Start deploy job (if tests pass)
Deploy Job->>Vercel: Pull environment config (using token)
Deploy Job->>Vercel: Build project artifacts
Deploy Job->>Vercel: Deploy artifacts (preview or production)
Vercel-->>Deploy Job: Deployment result
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Poem
Note ⚡️ Unit Test Generation is now available in beta!Learn more here, or try it out under "Finishing Touches" below. 📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (3)
✅ Files skipped from review due to trivial changes (1)
🚧 Files skipped from review as they are similar to previous changes (2)
✨ Finishing Touches🧪 Generate unit tests
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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 2
🧹 Nitpick comments (4)
.github/workflows/tests.yml (1)
24-26
: Drop debug-only “Check cache hit” stepThe step merely echoes an internal output and adds noise / time to every run.
- # for testing - - name: Check cache hit - run: echo "${{ steps.cp312.outputs.cache-hit }}".github/workflows/deploy_preview.yml (1)
20-35
: Add a concurrency group to cancel stale preview buildsForce-pushing to a PR currently spawns parallel builds. Save CI minutes and Vercel slots:
concurrency: group: preview-${{ github.event.pull_request.number }} cancel-in-progress: true.github/workflows/deploy_production.yml (2)
24-26
: Same version-pinning concern for Vercel CLISwitch from
vercel@canary
to a stable tag unless canary features are required.
16-34
: Concurrency control prevents overlapping production deploymentsTwo commits pushed in quick succession trigger two builds; the slower one might overwrite the newer release. Add:
concurrency: group: prod-${{ github.ref }} cancel-in-progress: false # or true if you prefer the latest build only
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (3)
.github/workflows/deploy_preview.yml
(1 hunks).github/workflows/deploy_production.yml
(1 hunks).github/workflows/tests.yml
(1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
- GitHub Check: deploy-preview
🔇 Additional comments (2)
.github/workflows/tests.yml (1)
3-5
: Reduced CI coverage – deliberate or oversight?With only
workflow_call
/workflow_dispatch
triggers, the tests workflow no longer runs for feature-branch pushes or PRs that don’t targetmaster
. Regressions could slip in unnoticed until a deployment workflow fires. Please confirm that this reduction in test coverage is intentional..github/workflows/deploy_production.yml (1)
8-10
: Automatic prod deploy on every push tomaster
– add a safety netA direct push to
master
deploys to production immediately. Consider requiring an environment-level approval or aworkflow_run
manual gate to avoid accidental releases.
Summary by CodeRabbit