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
+3 -1
View File
@@ -40,7 +40,9 @@ jobs:
if: failure()
with:
name: Results
path: test_output/IntegrationTests.xcresult.zip
path: |
test_output/IntegrationTests.xcresult.zip
test_output/console*
retention-days: 7
if-no-files-found: ignore
@@ -18,6 +18,7 @@
}
]
},
"diagnosticCollectionPolicy" : "Always",
"environmentVariableEntries" : [
{
"key" : "INTEGRATION_TESTS_HOST",
@@ -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