{"id":50168175,"url":"https://github.com/cyphercoderr/job-orchestrator","last_synced_at":"2026-05-24T22:02:43.686Z","repository":{"id":305047712,"uuid":"1021742874","full_name":"cyphercoderr/job-orchestrator","owner":"cyphercoderr","description":null,"archived":false,"fork":false,"pushed_at":"2025-07-17T22:07:51.000Z","size":1364,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-07-18T02:59:14.175Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cyphercoderr.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-07-17T22:00:48.000Z","updated_at":"2025-07-17T22:07:54.000Z","dependencies_parsed_at":"2025-07-18T04:21:43.257Z","dependency_job_id":null,"html_url":"https://github.com/cyphercoderr/job-orchestrator","commit_stats":null,"previous_names":["cyphercoderr/job-orchestrator"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/cyphercoderr/job-orchestrator","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cyphercoderr%2Fjob-orchestrator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cyphercoderr%2Fjob-orchestrator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cyphercoderr%2Fjob-orchestrator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cyphercoderr%2Fjob-orchestrator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cyphercoderr","download_url":"https://codeload.github.com/cyphercoderr/job-orchestrator/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cyphercoderr%2Fjob-orchestrator/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33452033,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-24T19:21:36.376Z","status":"ssl_error","status_checked_at":"2026-05-24T19:21:10.562Z","response_time":57,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-05-24T22:02:36.105Z","updated_at":"2026-05-24T22:02:43.679Z","avatar_url":"https://github.com/cyphercoderr.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Test Orchestration Platform 🚀\n\nA scalable, production-ready test orchestration platform built with NestJS microservices architecture. This platform enables automated testing across multiple environments including emulators, physical devices, and cloud services like BrowserStack.\n\n## 🏗️ Architecture Overview\n![Architecture Diagram](./docs/architecture.png)\n\nThe platform consists of three main microservices:\n\n- **job-api**: REST API service for job submission and management\n- **job-scheduler**: gRPC-powered service for job queuing and scheduling\n- **agent-runner**: Job execution service with simulated test runners\n\n### Key Features\n\n- ✅ **Microservices Architecture**: Scalable, maintainable service separation\n- ✅ **Job Grouping**: Intelligent batching by app version for efficiency\n- ✅ **Priority Queuing**: BullMQ-powered job prioritization and retry logic\n- ✅ **Multi-Environment Support**: Emulator, device, and BrowserStack targets\n- ✅ **CLI Tool**: Developer-friendly command-line interface\n- ✅ **CI/CD Integration**: GitHub Actions workflow automation\n- ✅ **Production Ready**: Docker containerization and health checks\n\n## 🚀 Quick Start\n\n### Prerequisites\n\n- Node.js 20+\n- Docker \u0026 Docker Compose\n- Git\n\n### 1. Clone and Setup\n\n```bash\ngit clone \u003crepository-url\u003e\ncd test-orchestration-platform\ncp .env.example .env\n```\n\n## 🛠️ Development\n\n### Running Services Locally\n\n```bash\n# Use specified node version\nnvm use\n\n# Install dependencies\nnpm install\n\n# Start MongoDB and Redis\ndocker-compose up -d mongodb redis\n\n# Start services in development mode\nnpm run dev:job-api\nnpm run dev:job-scheduler\nnpm run dev:agent-runner\n\n```\n\n### 2. Start Infrastructure (Using docker)\n\n```bash\n# Start all services\ndocker-compose up --build -d\n\n# Check service health\ndocker-compose ps\n```\n\n### 3. Install CLI Tool\n\n```bash\nnpm run build\nnpm link\n```\n\n### 4. Submit Your First Job\n\n```bash\n# Submit a test job\nqgjob submit \\\n  --org-id \"qualgent\" \\\n  --app-version-id \"v1.0.0\" \\\n  --test \"tests/smoke.spec.ts\" \\\n  --target \"emulator\" \\\n  --priority 8\n\n# Check job status\nqgjob status --job-id \u003cjob-id\u003e\n\n# Poll until completion\nqgjob poll --job-id \u003cjob-id\u003e --interval 5\n```\n\n### CLI Configuration\n\n```bash\n# Configure API endpoint\nqgjob config --api-url http://localhost:3001\n\n# Set default priority\nqgjob config --default-priority 7\n\n# Set default environment\nqgjob config --default-environment emulator\n```\n\n## 📋 API Reference\nYou can explore and test the API directly using Swagger:\n\n- **URL**: [http://localhost:3001/docs](http://localhost:3001/docs)\n\n### Submit Job\n```bash\nPOST /jobs/submit\n{\n   \"org_id\": \"qualgent\",\n   \"app_version_id\": \"v1.0.0\",\n   \"test_path\": \"tests/onboarding.spec.ts\",\n   \"target\": \"emulator\",\n   \"priority\": 8,\n   \"tags\": [\"ci\", \"smoke\"],\n   \"metadata\": {\"branch\": \"main\"}\n}\n\n```\n\n### Get Job Status\n```bash\nGET /jobs/status?jobId=\u003cjob-id\u003e\n```\n\n### Get Jobs by Group\n```bash\nGET /jobs/group/\u003capp-version-id\u003e?limit=10\u0026offset=0\n```\n\n### Get Statistics\n```bash\nGET /jobs/stats\n```\n\n## 🔄 CI/CD Integration\n\n### GitHub Actions\n\nThe platform includes a complete GitHub Actions workflow that:\n\n1. **Starts Infrastructure**: MongoDB, Redis services\n2. **Builds Services**: Compiles TypeScript, runs tests\n3. **Submits Test Jobs**: Multiple environment targets\n4. **Polls for Completion**: Waits for job results\n5. **Reports Results**: Success/failure with detailed logs\n\n### Example Workflow Usage\n\n```yaml\n- name: Run Test Orchestration\n  run: |\n    qgjob submit \\\n          --org-id \"qualgent\" \\\n          --app-version-id \"v1.2.3-${GITHUB_SHA:0:7}\" \\\n          --test \"tests/emulator.spec.ts\" \\\n          --target \"emulator\" \\\n          --priority 8\n```\n\n### Horizontal Scaling\n\n```bash\n# Scale API servers\ndocker-compose up -d --scale job-api=3\n\n# Scale agent runners\ndocker-compose up -d --scale agent-runner=5\n```\n\n### Performance Optimizations\n\n- **Database Indexing**: Optimized MongoDB indexes for queries\n- **Connection Pooling**: Efficient database connection management\n- **Queue Optimization**: BullMQ with Redis clustering support\n- **Caching**: Redis-based caching for frequent queries\n\n### Test Environments\n- **Emulator**: Fast, isolated testing\n- **Device**: Real device testing\n- **BrowserStack**: Cross-platform cloud testing\n\n## 📚 Advanced Features\n\n### Job Deduplication\nPrevents duplicate job submissions within configurable time windows.\n\n### Retry Logic\nExponential backoff retry mechanism with configurable attempts.\n\n### Audit Logging\nComprehensive logging for compliance and debugging.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcyphercoderr%2Fjob-orchestrator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcyphercoderr%2Fjob-orchestrator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcyphercoderr%2Fjob-orchestrator/lists"}