Skip to content

Commit 9f46bbe

Browse files
committed
refactor GitHub Actions workflow to replace docker-healthcheck-action with a custom health check script
1 parent 22686f4 commit 9f46bbe

1 file changed

Lines changed: 7 additions & 6 deletions

File tree

.github/workflows/test.yaml

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,13 @@ jobs:
3030
with:
3131
compose-file: docker-compose.yaml
3232
services: ${{ matrix.database.service }}
33-
- uses: stringbean/docker-healthcheck-action@v1
34-
with:
35-
container: data-access-kit-src_${{ matrix.database.service }}_1
36-
wait-time: 30
37-
require-status: running
38-
require-healthy: true
33+
- name: Wait for container health
34+
run: |
35+
timeout 30s bash -c 'until docker inspect --format="{{.State.Health.Status}}" data-access-kit-src-${{ matrix.database.service }}-1 | grep -q "healthy"; do
36+
echo "Waiting for container to be healthy..."
37+
sleep 2
38+
done'
39+
if: matrix.database.service != 'sqlite'
3940
- uses: shivammathur/setup-php@v2
4041
with:
4142
php-version: '8.3'

0 commit comments

Comments
 (0)