-
Notifications
You must be signed in to change notification settings - Fork 6
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Add a github actions workflow to spin up docker compose and perform some checks on the services.
This should make it easier to detect that a PR will leave the repository in a broken state.
- Health Checks
If your services have health checks defined, you can wait for them to become healthy.
Example GitHub Actions Step:
name: Start services and wait for health
run: |
docker compose up -d
docker compose ps --services | xargs -I {} sh -c 'docker inspect --format "{{.State.Health.Status}}" {}_1 | grep -q healthy || exit 1'
- Integration Testing
You can run tests against your running services. For example, if you have a web service, you can use curl or a testing tool like pytest to verify endpoints.
Example GitHub Actions Step:
name: Run integration tests
run: |
docker compose up -d
# Example: Test if a web service is reachable
curl --retry 5 --retry-delay 5 --retry-connrefused http://localhost:8080/health
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request