This directory contains the complete CI/CD pipeline configuration for ConnectKit, implementing modern DevOps practices with comprehensive testing, security scanning, and automated deployment.
Triggers: Push to main/develop, Pull Requests Purpose: Complete testing, building, and quality assurance
- Security Scan - Trivy vulnerability scanning
- Backend Tests - Unit tests, linting, type checking
- Frontend Tests - Unit tests, linting, type checking
- Build - Application build and artifact creation
- Docker Build - Container image building (push events only)
- E2E Tests - End-to-end testing (pull requests only)
- Summary - Pipeline results and reporting
- π Comprehensive test coverage reporting
- π³ Docker multi-stage builds with caching
- π Playwright E2E testing with video recordings
- π Codecov integration for coverage tracking
- β‘ Node.js dependency caching for faster builds
Triggers: Push to main, Version tags, Manual dispatch Purpose: Automated deployment to staging and production
- Build & Push - Docker images to registry
- Deploy Staging - Automatic staging deployment
- Deploy Production - Production deployment (tags/manual)
- Health Check - Post-deployment verification
Lightweight validation pipeline - currently disabled in favor of the main pipeline.
accessibility.yml- Accessibility testing with Lighthouse and WAVEsecurity.yml- Advanced security scanning (currently disabled)performance.yml- Performance testing (currently disabled)nightly.yml- Nightly comprehensive testingcompliance-federal.yml- Federal compliance checking
The following secrets need to be configured in your GitHub repository:
CODECOV_TOKEN- Codecov upload token for coverage reports
DOCKER_USERNAME- Docker Hub usernameDOCKER_PASSWORD- Docker Hub password or access token
The pipeline uses the following environment variables:
NODE_VERSION: "18"- Node.js version for all jobsDOCKER_BUILDKIT: 1- Enable Docker BuildKit for faster builds
- β±οΈ Average Runtime: ~15-20 minutes (full pipeline)
- π§ͺ Test Coverage: Backend 80%+, Frontend 80%+
- π Security Scanning: Trivy filesystem scanning
- π E2E Testing: Playwright with video recording
- π¦ Artifact Retention: 7 days for test results
- Node.js dependency caching
- Docker layer caching with GitHub Actions cache
- Parallel job execution
- Conditional job execution based on event type
# Backend tests
cd backend && npm test
# Frontend tests
cd frontend && npm run test:unit
# E2E tests (requires services running)
docker-compose up -d
cd frontend && npm run test:e2e# Build all services
docker-compose build
# Build specific service
docker build -f docker/backend/Dockerfile -t connectkit-backend ./backend
docker build -f docker/frontend/Dockerfile -t connectkit-frontend ./frontend- Check test logs in GitHub Actions
- Verify environment variables are set correctly
- Ensure database/Redis services are healthy
- Verify Dockerfile syntax
- Check for missing dependencies
- Review build context and file paths
- Check service health endpoints
- Verify environment configuration
- Review Playwright test recordings in artifacts
- Ensure
CODECOV_TOKENis set - Check coverage file paths
- Verify coverage reporters are configured
- Check pipeline logs in GitHub Actions tab
- Review artifact uploads for detailed reports
- Check service logs with
docker-compose logs - Verify environment configuration matches
.env.example
- All tests passing β
- Coverage thresholds met π
- No critical security vulnerabilities π
- Successful deployments π
- Automatic pipeline failure on test failures
- Security scan results reported
- Artifact retention for debugging
- Comprehensive error reporting in job summaries
- Update GitHub Actions versions quarterly
- Review and update security scanning rules
- Monitor pipeline performance metrics
- Update Node.js and dependency versions
- Increase runner resources for larger codebases
- Implement matrix builds for multiple environments
- Add more comprehensive E2E test coverage
- Consider self-hosted runners for private repositories
For questions or improvements to this CI/CD setup, please open an issue or submit a pull request.