feat(tests): add api e2e tests (#3617)

* feat(tests): add api e2e tests

* lockfile

* mobile

* try linux fix [skip ci]

* ios fix

* fix test on windows

* improve cache

* fix pnpm audit [skip ci]
This commit is contained in:
Lucas Fernandes Nogueira
2026-09-22 18:58:14 -03:00
committed by GitHub
parent 7f87091288
commit 684feb2510
47 changed files with 10292 additions and 107 deletions
+50
View File
@@ -0,0 +1,50 @@
#!/bin/bash
# Copyright 2019-2023 Tauri Programme within The Commons Conservancy
# SPDX-License-Identifier: Apache-2.0
# SPDX-License-Identifier: MIT
# Collects and prints macOS crash reports after a failed plugins e2e run.
#
# The CrabNebula Webdriver proxies every command to a server running *inside* the app
# process, so when the app dies the suite only ever reports `connection refused` — the
# actual cause is never in the job log. The app's stdout/stderr is inherited and no panic
# message is printed, which means it goes down on a signal. macOS records the reason in a
# crash report, and that is the only place it survives the run.
#
# Copies every report into $1 (default: $RUNNER_TEMP/crash-reports) for upload.
set -euo pipefail
dest="${1:-${RUNNER_TEMP:-/tmp}/crash-reports}"
mkdir -p "$dest"
# ReportCrash writes asynchronously; give the last crash a moment to land.
sleep 5
found=0
for f in "$HOME/Library/Logs/DiagnosticReports"/*.ips \
"$HOME/Library/Logs/DiagnosticReports/Retired"/*.ips; do
[ -e "$f" ] || continue
found=$((found + 1))
cp "$f" "$dest/"
echo "::group::$(basename "$f")"
# An .ips file is a one-line JSON header followed by the JSON report body.
head -n 1 "$f"
tail -n +2 "$f" | jq -r '
"exception: \(.exception // {} | tojson)",
"termination: \(.termination // {} | tojson)",
"asi: \(.asi // {} | tojson)",
"faulting thread \(.faultingThread // 0):",
(. as $r
| $r.threads[$r.faultingThread // 0].frames[]?
| " \($r.usedImages[.imageIndex].name // "?") \(.symbol // "?") +\(.imageOffset)"),
"last ObjC exception:",
(. as $r
| $r.lastExceptionBacktrace[]?
| " \($r.usedImages[.imageIndex].name // "?") \(.symbol // "?") +\(.imageOffset)")
' || cat "$f"
echo "::endgroup::"
done
[ "$found" -gt 0 ] || echo "no crash reports under $HOME/Library/Logs/DiagnosticReports"