CI/CD Overview
GitHub Actions Workflows
CharleOS has several automated workflows:CI Pipeline
Runs on every PR to
main- Linting
- Type checking
- Unit tests
- Build verification
E2E Tests
Runs on PRs (separate workflow)
- Playwright E2E tests
- Critical user flows
- Browser compatibility
Dependabot
Automatic dependency updates
- Security patches
- Minor version bumps
- Auto-merge for tests
Release
Automated changelog and versioning
- Conventional commits
- Semantic versioning
- GitHub releases
CI Workflow (.github/workflows/ci.yml)
Workflow Configuration
Lint Job
- Code style (Prettier)
- ESLint rules
- Import order
- Unused variables
Type Check Job
- TypeScript compilation errors
- Type mismatches
- Missing type definitions
Unit Tests Job
- Business logic
- Utility functions
- Billing calculations
- Date/time utilities
Build Job
- Next.js builds successfully
- No build errors
- TypeScript compiles in build mode
Security Audit
- Known vulnerabilities in dependencies
- Security advisories
- High/critical severity issues
E2E Workflow (.github/workflows/e2e.yml)
- Authentication flows
- Critical user journeys
- Task/quote workflows
- Client portal functionality
Dependabot Configuration
Automatic dependency updates:Branch Protection Rules
main branch is protected with:
Required checks:
- ✅ Lint
- ✅ Type check
- ✅ Unit tests
- ✅ Build
- ✅ E2E tests
- Require PR review (1 approval)
- Dismiss stale reviews on new push
- Require linear history
- No force push allowed
Continuous Deployment
Vercel Integration
Vercel automatically deploys: Production:- Trigger: Push to
main - URL:
https://charle.agency - Only after CI passes
- Trigger: Open/update PR
- URL:
https://charle-os-git-{branch}.vercel.app - Deploys even if CI fails (for testing)
Deployment Process
Release Workflow
Automated releases using Release Please:- Analyzes conventional commits since last release
- Generates changelog
- Bumps version in
package.json - Creates GitHub release
- Tags commit
Monitoring CI/CD
GitHub Actions Dashboard
View workflow runs: URL: https://github.com/charle/charle-os/actions Information:- All workflow runs
- Duration and status
- Logs for each step
- Artifacts (coverage reports, test results)
Notifications
Failed CI sends notifications via:- GitHub UI
- Email (to PR author)
- Slack (optional integration)
Performance Optimization
Caching
Cache speeds up CI significantly: Dependencies:Parallelization
Jobs run in parallel when possible:Troubleshooting
CI Failing
Error: “Lint failed” Fix:Dependabot PRs Not Auto-Merging
Cause: CI not passing or version is major bump Fix:- Check CI logs
- Fix any test failures
- For major bumps, review manually
E2E Tests Flaky
Cause: Timing issues, race conditions Fix:- Add explicit waits:
await page.waitForSelector(...) - Use
waitForLoadState('networkidle') - Increase timeouts for slow operations
Best Practices
Always Test Locally First
Always Test Locally First
Before pushing:
Write Good Commit Messages
Write Good Commit Messages
Use conventional commits:
Monitor CI Failures
Monitor CI Failures
Don’t ignore failed CI:
- Fix failures immediately
- Don’t merge with failing tests
- Investigate flaky tests
Keep CI Fast
Keep CI Fast
Optimize for speed:
- Use caching
- Parallelize jobs
- Only run necessary checks