name: Network Check on: push: workflow_dispatch: jobs: network-test: runs-on: ubuntu-latest steps: - name: Show basic environment run: | echo "== Hostname ==" hostname || true echo echo "== OS Info ==" uname -a || true cat /etc/os-release || true echo echo "== DNS Config ==" cat /etc/resolv.conf || true echo - name: Install tools if missing run: | sudo apt-get update || true sudo apt-get install -y curl dnsutils iputils-ping netcat-openbsd || true - name: DNS resolve test run: | echo "== DNS resolve: google.com ==" nslookup google.com || true echo echo "== DNS resolve: github.com ==" nslookup github.com || true echo echo "== DNS resolve: gitea.paradigm-edu.net ==" nslookup gitea.paradigm-edu.net || true echo - name: Ping test run: | echo "== Ping: google.com ==" ping -c 4 google.com || true echo echo "== Ping: github.com ==" ping -c 4 github.com || true echo echo "== Ping: gitea.paradigm-edu.net ==" ping -c 4 gitea.paradigm-edu.net || true echo - name: TCP port 443 test run: | echo "== TCP 443: google.com ==" nc -vz -w 5 google.com 443 || true echo echo "== TCP 443: github.com ==" nc -vz -w 5 github.com 443 || true echo echo "== TCP 443: gitea.paradigm-edu.net ==" nc -vz -w 5 gitea.paradigm-edu.net 443 || true echo - name: HTTP/HTTPS curl test run: | echo "== curl: https://www.google.com ==" curl -I -L --max-time 15 -o /dev/null -s \ -w "HTTP_CODE=%{http_code} DNS=%{time_namelookup}s CONNECT=%{time_connect}s TLS=%{time_appconnect}s TTFB=%{time_starttransfer}s TOTAL=%{time_total}s\n" \ https://www.google.com || true echo echo "== curl: https://github.com ==" curl -I -L --max-time 15 -o /dev/null -s \ -w "HTTP_CODE=%{http_code} DNS=%{time_namelookup}s CONNECT=%{time_connect}s TLS=%{time_appconnect}s TTFB=%{time_starttransfer}s TOTAL=%{time_total}s\n" \ https://github.com || true echo echo "== curl: https://gitea.paradigm-edu.net/ ==" curl -I -L --max-time 15 -o /dev/null -s \ -w "HTTP_CODE=%{http_code} DNS=%{time_namelookup}s CONNECT=%{time_connect}s TLS=%{time_appconnect}s TTFB=%{time_starttransfer}s TOTAL=%{time_total}s\n" \ https://gitea.paradigm-edu.net/ || true echo - name: Detailed verbose curl for debugging run: | echo "== Verbose curl: github.com ==" curl -v --max-time 20 https://github.com -o /dev/null || true echo echo "== Verbose curl: gitea.paradigm-edu.net ==" curl -v --max-time 20 https://gitea.paradigm-edu.net/ -o /dev/null || true echo