GitHub Actions Workflows
The DashClicks Back-End repository uses GitHub Actions for comprehensive CI/CD automation, including testing, linting, Docker image building, coverage reporting, and deployment workflows. All workflows are located in .github/workflows/ and provide automated quality assurance and deployment capabilities.
๐ Workflow Overviewโ
The repository contains 7 workflows for CI/CD automation:
๐๏ธ Build & Deploymentโ
- build.docker.yaml - Multi-service Docker image builder
- common.docker.yaml - Reusable Docker build workflow template
- tag-trigger.yaml - Version tag deployment trigger
๐งช Testing & Qualityโ
- unit-tests.yml - Node.js and Deno test runner
- lint-check.yaml - Code quality validation
- generate-coverage.yaml - Coverage reporting and badge generation
๐ Notificationsโ
- pr-review-reminder.yaml - PR review notifications
๐ Workflow Triggersโ
| Workflow | Trigger Events | Services Affected | Purpose |
|---|---|---|---|
| Docker Build | Manual dispatch, Workflow call | 12 microservices | Container image building |
| Unit Tests | Pull requests, Manual dispatch | Node.js & Deno | Test execution |
| Lint Check | Pull requests | Changed files | Code quality validation |
| Coverage | Push to prod branch | All services | Coverage reporting |
| Tag Trigger | Version tags (v*) | All services | Production deployment |
| PR Reminder | PR opened/reopened | N/A | Team notifications |
| Common Docker | Called by other workflows | Individual services | Reusable build template |
๐๏ธ Services Supportedโ
Workflows support 12 microservices:
API Servicesโ
api-internal- Internal business logicapi-external- Third-party integrationsapi-ai- AI service (Deno-based)
Gateway & Communicationโ
dashboard-gateway- Frontend proxysocket-conversation- Real-time messagingsocket-general- General real-time events
Background Processingโ
queue-manager-general- Background jobsqueue-manager-puppeteer- Browser automationnotifications- Email/SMS notifications
Utilitiesโ
callrail-proxy- CallRail API proxycurrency-converter- Currency conversionmisc-proxy- General proxy service
๐ ๏ธ Technology Stackโ
Node.js Services (11 services)โ
- Testing: Jest with MongoDB Memory Server 6.0.9
- Linting: ESLint with JSON output
- Build: Docker with shared file copying
- Dependencies: pnpm/npm with caching
Deno Service (1 service - AI)โ
- Testing: Deno test runner with coverage
- Linting: Deno lint, format, and type checking
- Build: Deno Docker builds
๐ง Infrastructure Configurationโ
Docker Registryโ
gcr.io/dash-208313/dashclicks-[env]-[service]
Environment Typesโ
- Development: Feature branch builds
- Staging: Custom tag deployments
- Production: Version tag releases
Caching Pathsโ
- Node.js:
~/.pnpm,~/.npm - MongoDB:
/tmp/mongodb-binaries - Docker: Registry layer caching
๐ Validation Requirementsโ
Pre-merge Checksโ
- Lint Check: ESLint errors block execution
- Unit Tests: Jest and Deno test execution
- Type Safety: Deno TypeScript validation
- Coverage: 40% branch, 50% function minimum
Automated Outputsโ
- PR Comments: Test and lint results with collapsible sections
- Coverage Badges: SVG badge updates to
.github/coverage.svg - Webhook Notifications: Discord/Slack PR notifications
- Artifacts: 7-14 day retention for test results
๐ Execution Flowsโ
Pull Request Flowโ
PR Creation โ Lint Check โ Unit Tests โ Review
Production Flowโ
Version Tag โ Docker Build โ Image Push โ Draft Release
๐ Workflow Documentationโ
Build & Deploymentโ
- build.docker.yaml - Multi-service Docker image builder
- common.docker.yaml - Reusable Docker build template
- tag-trigger.yaml - Version tag deployment trigger
Testing & Qualityโ
- unit-tests.yml - Node.js and Deno test runner
- lint-check.yaml - Code quality validation
- generate-coverage.yaml - Coverage reporting and badges
Notificationsโ
- pr-review-reminder.yaml - PR review notifications
๐ง Required Configurationโ
Repository Variablesโ
PR_REMINDER_WEBHOOK_URL: Team notification webhook
Repository Secretsโ
GKE_SA_KEY: Google Cloud service account key
GKE_PROJECT: Google Cloud project ID
PACKAGE_TOKEN: GitHub Packages authentication
COVERAGE_GENERATE_TOKEN: Coverage badge update token
GITHUB_TOKEN: Automatic GitHub API access
๐ Technical Specificationsโ
Runtime Requirementsโ
- Node.js: Version 18 and 20 support
- Deno: Version 2.1.7
- MongoDB: Memory Server 6.0.9
- Chrome: Latest for Puppeteer tests
Coverage Thresholdsโ
- Branch Coverage: 40% minimum
- Function Coverage: 50% minimum
- Line Coverage: 50% minimum
- Statement Coverage: 50% minimum
๐ Related Documentationโ
- Service Documentation - Individual service details
- Common Documentation - Shared infrastructure