Improve integration test diagnostics in an attempt to catch run crashes

This commit is contained in:
Stefan Ceriu
2026-08-10 12:26:13 +03:00
parent 45890c71a2
commit 0856fdc146
3 changed files with 8 additions and 1 deletions
@@ -32,6 +32,10 @@ struct IntegrationTests: AsyncParsableCommand {
} catch {
testsFailed = true
logger.error("\n❌ Integration tests failed.\n")
// Preserve the app's logs alongside the results so that they can be uploaded as artifacts.
logger.info("🗂️ Collecting log files…")
_ = try? await CI.run(.path("/bin/zsh"), ["-cu", "cp /Users/Shared/console* \(CI.testOutputDirectory)"])
}
// Validate logs only when tests passed — log files won't be meaningful otherwise