Skip to content

Add test workflow using options field for healthcheck #2

Add test workflow using options field for healthcheck

Add test workflow using options field for healthcheck #2

name: Test Healthcheck DSL - Service Containers

Check failure on line 1 in .github/workflows/test-healthcheck.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/test-healthcheck.yml

Invalid workflow file

(Line: 15, Col: 9): Unexpected value 'healthcheck-cmd', (Line: 16, Col: 9): Unexpected value 'healthcheck-interval', (Line: 17, Col: 9): Unexpected value 'healthcheck-timeout', (Line: 18, Col: 9): Unexpected value 'healthcheck-retries', (Line: 31, Col: 9): Unexpected value 'healthcheck-cmd', (Line: 32, Col: 9): Unexpected value 'healthcheck-interval', (Line: 33, Col: 9): Unexpected value 'healthcheck-timeout', (Line: 34, Col: 9): Unexpected value 'healthcheck-retries', (Line: 59, Col: 5): Unexpected value 'volumes'
on:
workflow_dispatch:
push:
branches:
- feature/service-container-healthcheck
jobs:
test-healthcheck:
runs-on: self-hosted
services:
minio:
image: quay.io/minio/minio:latest
healthcheck-cmd: "curl -f http://localhost:9000/minio/health/live || exit 1"
healthcheck-interval: 30s
healthcheck-timeout: 10s
healthcheck-retries: 5
env:
MINIO_ROOT_USER: minioadmin
MINIO_ROOT_PASSWORD: minioadmin
ports:
- 9000:9000
- 9001:9001
volumes:
- minio-data:/data
command: server /data --console-address ":9001"
redis:
image: redis:7-alpine
healthcheck-cmd: "redis-cli ping"
healthcheck-interval: 5s
healthcheck-timeout: 3s
healthcheck-retries: 3
ports:
- 6379:6379
steps:
- name: Verify healthcheck configuration
run: |
echo "Checking Minio healthcheck..."
curl -f http://localhost:9000/minio/health/live || exit 1
echo "✅ Minio healthcheck passed"
echo "Checking Redis healthcheck..."
redis-cli -h localhost ping
echo "✅ Redis healthcheck passed"
- name: Inspect container healthcheck config
run: |
echo "Container health configurations:"
echo ""
echo "Minio container:"
docker inspect --format='Healthcheck: {{.Config.Healthcheck}}' $(docker ps -q -f "name=minio") || true
echo ""
echo "Redis container:"
docker inspect --format='Healthcheck: {{.Config.Healthcheck}}' $(docker ps -q -f "name=redis") || true
volumes:
minio-data: