diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 2085f202..4eed6486 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -18,10 +18,25 @@ jobs: rm -f volumes/lnd/dave/tls.cert - name: Build the stack run: docker compose --project-directory ./ -f src/tests/docker-compose.yml up -d + - name: Check container status + run: | + echo "Container status:" + docker ps -a + echo "Alice logs:" + docker logs polar-n2-alice --tail 20 || true + echo "Bob logs:" + docker logs polar-n2-bob --tail 20 || true - name: Wait for LND containers to be ready run: | echo "Waiting for LND containers to start and generate certificates..." sleep 30 + # Wait for containers to be running first + echo "Waiting for containers to be running..." + timeout 120 bash -c 'until docker ps --filter "name=polar-n2-alice" --filter "status=running" --format "{{.Names}}" | grep -q polar-n2-alice; do sleep 5; done' + timeout 120 bash -c 'until docker ps --filter "name=polar-n2-bob" --filter "status=running" --format "{{.Names}}" | grep -q polar-n2-bob; do sleep 5; done' + timeout 120 bash -c 'until docker ps --filter "name=polar-n2-carol" --filter "status=running" --format "{{.Names}}" | grep -q polar-n2-carol; do sleep 5; done' + timeout 120 bash -c 'until docker ps --filter "name=polar-n2-dave" --filter "status=running" --format "{{.Names}}" | grep -q polar-n2-dave; do sleep 5; done' + echo "Containers are running, waiting for certificates..." # Wait for certificates to be generated timeout 120 bash -c 'until docker exec polar-n2-alice test -f /home/lnd/.lnd/tls.cert; do sleep 5; done' timeout 120 bash -c 'until docker exec polar-n2-bob test -f /home/lnd/.lnd/tls.cert; do sleep 5; done'