Skip to main content

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โ€‹

๐Ÿงช Testing & Qualityโ€‹

๐Ÿ”” Notificationsโ€‹

๐Ÿ”„ Workflow Triggersโ€‹

WorkflowTrigger EventsServices AffectedPurpose
Docker BuildManual dispatch, Workflow call12 microservicesContainer image building
Unit TestsPull requests, Manual dispatchNode.js & DenoTest execution
Lint CheckPull requestsChanged filesCode quality validation
CoveragePush to prod branchAll servicesCoverage reporting
Tag TriggerVersion tags (v*)All servicesProduction deployment
PR ReminderPR opened/reopenedN/ATeam notifications
Common DockerCalled by other workflowsIndividual servicesReusable build template

๐Ÿ—๏ธ Services Supportedโ€‹

Workflows support 12 microservices:

API Servicesโ€‹

  • api-internal - Internal business logic
  • api-external - Third-party integrations
  • api-ai - AI service (Deno-based)

Gateway & Communicationโ€‹

  • dashboard-gateway - Frontend proxy
  • socket-conversation - Real-time messaging
  • socket-general - General real-time events

Background Processingโ€‹

  • queue-manager-general - Background jobs
  • queue-manager-puppeteer - Browser automation
  • notifications - Email/SMS notifications

Utilitiesโ€‹

  • callrail-proxy - CallRail API proxy
  • currency-converter - Currency conversion
  • misc-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โ€‹

  1. Lint Check: ESLint errors block execution
  2. Unit Tests: Jest and Deno test execution
  3. Type Safety: Deno TypeScript validation
  4. 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โ€‹

Testing & Qualityโ€‹

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

๐Ÿ’ฌ

Documentation Assistant

Ask me anything about the docs

Hi! I'm your documentation assistant. Ask me anything about the docs!

I can help you with:
- Code examples
- Configuration details
- Troubleshooting
- Best practices

Try asking: How do I configure the API?
09:31 AM