From 4b153c1960c925014b6075ef03448a87c2a578a9 Mon Sep 17 00:00:00 2001 From: Jared Vititoe Date: Tue, 6 Oct 2026 23:53:40 -0400 Subject: [PATCH] ci: fix smoke test failing on curl | grep -q under pipefail Co-Authored-By: Claude Opus 5.5 --- .gitea/workflows/build-deb.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.gitea/workflows/build-deb.yml b/.gitea/workflows/build-deb.yml index 14a1bf1..1254890 100644 --- a/.gitea/workflows/build-deb.yml +++ b/.gitea/workflows/build-deb.yml @@ -84,6 +84,7 @@ jobs: - name: Smoke test run: | + set -x apt-get install -y -qq ./out/devdesk_*.deb >/dev/null /usr/lib/devdesk/bin/ttyd --version test -s /etc/devdesk/secret.env @@ -95,7 +96,9 @@ jobs: for _ in $(seq 1 30); do curl -s -o /dev/null localhost:7681/ && break; sleep 0.2; done code=$(curl -s -o /dev/null -w '%{http_code}' localhost:7681/) [ "$code" = 401 ] || { echo "expected 401 without credential, got $code"; exit 1; } - curl -sf -u "$DEVDESK_CREDENTIAL" localhost:7681/ | grep -q 'name="generator" content="devdesk"' + # Download first: `curl | grep -q` fails under pipefail (grep exits early, curl gets SIGPIPE). + curl -sf -u "$DEVDESK_CREDENTIAL" -o page.html localhost:7681/ + grep -q 'name="generator" content="devdesk"' page.html curl -sf -u "$DEVDESK_CREDENTIAL" localhost:7681/token | jq -e '.token | length > 0' DEVDESK_NO_SYSTEMD=1 devdesk attach --list | jq -e '.default == "main"' echo "smoke test passed"