๐ Action: Setup Services
Orchestrate background services and perform automated health checks to ensure infrastructure readiness before any test execution.
[!IMPORTANT] The Setup Services action eliminates race conditions in your CI/CD by intelligently standing up backend and frontend architectures, guaranteeing that the target endpoints are fully healthy (
HTTP 200) before yielding control back to the runner.
๐ Key Impact
- ๐๏ธ Service Orchestration: Seamlessly launches backend and frontend processes in the background for integrated testing.
- ๐ฉบ Automated Health Checks: Waits for specific endpoints to return
200 OKbefore allowing the pipeline to proceed. - ๐ Debug Intelligence: Automatically captures and prints service logs (
backend.log,frontend.log) upon startup failure. - โก Performance-Focused: Minimizes waiting time with configurable timeouts and intelligent retry logic.
๐ ๏ธ Configuration
| Input | Required | Default | Description |
|---|---|---|---|
start-services-command |
Yes | - | Shell command to start background services. |
health-check-urls |
Yes | - | Space-separated URLs to wait for (health endpoints). |
health-check-timeout |
No | 60000 |
Maximum time to wait for services in milliseconds. |
โก Quick Start
Drop this snippet into your workflow:
steps:
- name: ๐ Setup Application Services
uses: carlos-camara/qa-hub-actions/setup-services@main
with:
start-services-command: "npm start &"
health-check-urls: "http://localhost:3000/health"
health-check-timeout: "45000"
[View Full Wiki](https://carlos-camara.github.io/qa-hub-actions/actions/setup-services/)