From cda28cc6be5a2d42c3b23f00c94ccd39345aaccd Mon Sep 17 00:00:00 2001 From: SuperDooper86 Date: Wed, 9 Sep 2026 23:51:29 +0200 Subject: [PATCH] ci: preserve evidence when the Mac smoke launch stalls --- .gitea/workflows/build.yml | 2 ++ scripts/smoke_test_api.py | 3 +++ 2 files changed, 5 insertions(+) diff --git a/.gitea/workflows/build.yml b/.gitea/workflows/build.yml index c7d2281..a80a61a 100644 --- a/.gitea/workflows/build.yml +++ b/.gitea/workflows/build.yml @@ -37,11 +37,13 @@ jobs: - name: Smoke test local API run: python3 scripts/smoke_test_api.py "$RUNNER_TEMP/DerivedData/Build/Products/Release/Meetingnotes.app" - name: Package test build + if: always() run: | app_path="$RUNNER_TEMP/DerivedData/Build/Products/Release/Meetingnotes.app" ditto -c -k --sequesterRsrc --keepParent \ "$app_path" "$RUNNER_TEMP/Meetingnotes-macOS.zip" - name: Upload test build + if: always() uses: actions/upload-artifact@v4 with: name: Meetingnotes-macOS-${{ github.sha }} diff --git a/scripts/smoke_test_api.py b/scripts/smoke_test_api.py index ec072c5..c260255 100644 --- a/scripts/smoke_test_api.py +++ b/scripts/smoke_test_api.py @@ -40,6 +40,9 @@ with tempfile.TemporaryFile() as log: raise RuntimeError("Recording status allowed an unauthenticated request") print("Local API readiness and authentication checks passed") except Exception: + if process.poll() is None: + sample = subprocess.run(["sample", str(process.pid), "1", "1"], capture_output=True, text=True, timeout=10) + print(sample.stdout[:14000], file=sys.stderr) log.seek(0) print(log.read().decode(errors="replace")[-8000:], file=sys.stderr) raise