diff --git a/.gitea/workflows/nightly.yml b/.gitea/workflows/nightly.yml index 82fc0c5c..bdfa399f 100644 --- a/.gitea/workflows/nightly.yml +++ b/.gitea/workflows/nightly.yml @@ -75,6 +75,20 @@ jobs: --profile staging \ up -d --wait --remove-orphans + - name: Smoke test deployed environment + # Healthchecks confirm containers are healthy; they do NOT confirm the + # public surface works. This step catches: Caddy not reloaded, DNS + # missing, HSTS header dropped, /actuator block bypassed. + run: | + set -e + URL="https://staging.raddatz.cloud" + echo "Smoke test: $URL" + curl -fsS --max-time 10 "$URL/login" -o /dev/null + curl -fsS --max-time 10 -I "$URL/" | grep -qi 'strict-transport-security' + status=$(curl -s -o /dev/null -w "%{http_code}" --max-time 10 "$URL/actuator/health") + [ "$status" = "404" ] || { echo "expected 404 from /actuator/health, got $status"; exit 1; } + echo "All smoke checks passed" + - name: Cleanup env file if: always() run: rm -f .env.staging