This directory contains automated GitHub Actions workflows for continuous integration and deployment.
Runs on every push and pull request to validate code quality.
Jobs:
- Contract checks (Clarinet)
- Contract tests
- Frontend linting
- Frontend build
- Frontend tests
- TypeScript type checking
- Code quality checks
Triggers:
- Push to main, develop, and feature/fix/refactor branches
- Pull requests to main and develop
Automatically deploys preview builds for pull requests to Vercel.
Jobs:
- Build frontend
- Deploy to Vercel staging
- Comment PR with preview URL
Triggers:
- Pull requests to main and develop
- On open, synchronize, and reopen events
Deploys to production after all checks pass.
Jobs:
- Full test suite
- Build verification
- Production deployment to Vercel
- Deployment tracking
Triggers:
- Push to main branch
- Manual workflow dispatch
Creates versioned releases with artifacts.
Jobs:
- Full test suite
- Create git tag
- Create GitHub release
- Upload build artifacts
Triggers:
- Manual workflow dispatch with version input
Comprehensive security scanning and vulnerability detection.
Jobs:
- Dependency security check
- CodeQL analysis
- Trivy vulnerability scan
- Secret scanning
- License compliance check
Triggers:
- Push to main and develop
- Pull requests
- Weekly schedule (Sunday 2 AM UTC)
Analyzes code quality and complexity.
Jobs:
- SonarQube analysis
- Prettier format check
- ESLint validation
- Code complexity analysis
- Dependency tree generation
Triggers:
- Push to main and develop
- All pull requests
Scheduled tasks for maintenance and monitoring.
Jobs:
- Dependency update checks
- Test report generation
- Performance baseline recording
- Artifact cleanup
Triggers:
- Weekly schedule (Sunday 00:00 UTC)
The following secrets need to be configured in GitHub:
VERCEL_TOKEN - Vercel authentication token
VERCEL_ORG_ID - Vercel organization ID
VERCEL_PROJECT_ID - Vercel project ID
SONAR_HOST_URL - SonarQube host URL (optional)
SONAR_TOKEN - SonarQube authentication token (optional)
- Create feature branch from main or develop
- Push commits - CI pipeline runs automatically
- All checks must pass before merge
- Preview deployment available for review
- Once approved, merge to main
- Production deployment runs automatically
All of the following must pass before merging:
- Contract checks
- Contract tests
- Frontend linting
- Frontend build
- Frontend tests
- TypeScript type checking
- Code quality checks
- Security scans
Run these commands locally before pushing:
npm test # Contract tests
npm run security:audit # Security check
cd frontend
npm run lint # Linting
npm run build # Build
npm run format:check # Format check
npx tsc --noEmit # Type checkESLint failures:
cd frontend
npm run lint:fixFormat failures:
cd frontend
npm run formatType check failures:
cd frontend
npx tsc --noEmitBuild failures: Check frontend/build logs for errors
Test failures: Run tests locally and debug
Vercel deployment fails:
- Check VERCEL_TOKEN is valid
- Verify VERCEL_PROJECT_ID matches project
- Check frontend build succeeds locally
Preview URL not showing:
- Wait for deploy-preview workflow to complete
- Check GitHub Actions logs
- Verify Vercel integration is connected
Monitor workflow runs at: GitHub Settings > Actions > All workflows
Monitor deployments at: vercel.com dashboard
Recent deployments and their status visible in:
- Pull request comments (preview URLs)
- GitHub Deployments tab
- Vercel project dashboard
Configure these on main and develop branches:
-
Require status checks to pass:
- Contract Checks
- Contract Tests
- Frontend Lint
- Frontend Build
- Frontend Tests
- TypeScript Type Check
-
Require pull request reviews before merging
-
Require branches to be up to date before merging
-
Include administrators in restrictions
- CI pipeline typically completes in 5-10 minutes
- Contract tests are the slowest part
- Frontend build usually completes in 2-3 minutes
- Parallel jobs reduce total time significantly
- Pipeline uses GitHub-hosted runners
- Concurrency groups prevent duplicate runs
- Scheduled jobs run only weekly
- Build artifacts auto-clean after 1 day