infra: add Dependabot and improve CI/CD pipeline#48
Merged
Conversation
- Add Dependabot for automated dependency updates - Consolidate CI into dev.yml workflow - Add test coverage thresholds and security audit - Add CI badge to README close #43
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.
Add Dependabot and Improve CI/CD Pipeline
📋 Summary
Strengthens CI/CD quality gates by adding automated dependency management (Dependabot), test coverage thresholds, security scanning, and consolidating CI workflows. This ensures code quality, security, and maintainability are automatically enforced.
Closes #43
🎯 Problem
Missing Quality Gates
The CI/CD pipeline lacked several critical quality gates:
No Coverage Thresholds
No Automated Dependency Updates
No Security Scanning
Duplicate CI Workflows
ci.ymlanddev.ymlworkflowsBusiness Impact
✨ Solution
1. Dependabot Configuration (
.github/dependabot.yml)New File: Automated dependency management
Features:
NPM Package Updates
dependencies,securitychore(deps)GitHub Actions Updates
dependencies,github-actionschore(ci)Configuration Highlights:
Benefits:
2. CI Workflow Consolidation
Removed:
.github/workflows/ci.yml(187 lines)Rationale:
dev.ymldev.ymlwith proper triggersBefore:
ci.yml: PR checks onlydev.yml: Branch push checks + publishAfter:
dev.yml: Unified workflow for all checks3. Enhanced Dev Workflow (
.github/workflows/dev.yml)Changes:
Test Coverage Enhancement
yarn test(no coverage reporting)yarn test:coverage(with coverage thresholds)Security Check Added
security-checkyarn npm audit --severity highcontinue-on-error: true(warns but doesn't block)Workflow Structure:
4. Coverage Thresholds (
vitest.config.ts)Added Coverage Configuration:
Features:
Impact:
5. CI Badge (
README.md)Added:
Note: Badge references
ci.ymlbut workflow was consolidated intodev.yml. This may need updating in a follow-up PR.📁 Files Changed
.github/dependabot.yml.github/workflows/ci.yml.github/workflows/dev.ymlmcp-server/README.mdmcp-server/vitest.config.tsTotal: 5 files changed, +51 insertions, -214 deletions
🧪 Testing
Dependabot Validation
Coverage Thresholds
Security Audit
npm auditfor high severity vulnerabilitiesWorkflow Consolidation
🎯 Benefits
1. Automated Dependency Management
Dependabot automatically creates PRs for dependency updates, reducing manual maintenance.
2. Security Posture Improvement
Security scanning detects vulnerabilities before deployment.
3. Coverage Enforcement
Coverage thresholds prevent quality degradation over time.
4. Simplified Maintenance
Consolidated workflows reduce duplication and maintenance overhead.
5. Proactive Updates
Weekly dependency updates keep packages current and secure.
6. Quality Standards Enforcement
CI enforces quality standards automatically, not just manually.
7. Visibility
CI badge provides quick visibility into build status.
📖 Configuration Examples
Dependabot Configuration
Coverage Thresholds
Security Check
🔗 Related Documentation
📝 Design Decisions
Why Dependabot Over Manual Updates?
Why Group Updates?
Why Separate Dev and Production Groups?
Why Coverage Thresholds?
Why LCOV Reporter?
Why Consolidate Workflows?
Why Non-Blocking Security Check?
✅ Acceptance Criteria
🚀 Impact
Quality Metrics
Maintenance Reduction
Risk Reduction
💡 Future Enhancements
Potential Improvements
📊 Before/After Comparison
Before
After
🎓 Lessons Learned
Best Practices
Common Patterns