diff --git a/.forgejo/workflows/ci.yml b/.forgejo/workflows/ci.yml index 5a58da1..9f900c7 100644 --- a/.forgejo/workflows/ci.yml +++ b/.forgejo/workflows/ci.yml @@ -37,6 +37,18 @@ jobs: - name: Prepare environment run: cp .env.testing .env + # Temporary: MySQL is unreachable at db:3306 under the prebuilt image, + # though the identical service block worked on catthehacker/ubuntu. + - name: Diagnose service networking + continue-on-error: true + run: | + echo "--- /etc/hosts ---"; cat /etc/hosts || true + echo "--- /etc/resolv.conf ---"; cat /etc/resolv.conf || true + echo "--- php resolves db ---"; php -r 'var_dump(gethostbyname("db"));' || true + echo "--- php connect ---"; php -r '$e=null;$f=@fsockopen("db",3306,$n,$e,3);echo $f?"open\n":"fail: $e\n";' || true + echo "--- hostname/ip ---"; hostname -i 2>/dev/null || true + echo "--- env ---"; env | sort | grep -iE "host|service|port" || true + - name: Wait for MySQL run: | for i in $(seq 1 30); do