Annotate failures for Github Actions so they're easier to spot.

This commit is contained in:
Stefan Ceriu
2026-08-10 19:35:36 +03:00
parent b829c6a06f
commit 42a7b6e8ee
7 changed files with 19 additions and 0 deletions
@@ -32,6 +32,7 @@ struct IntegrationTests: AsyncParsableCommand {
} catch {
testsFailed = true
logger.error("\n❌ Integration tests failed.\n")
CI.annotateError(title: "Integration tests failed", "One or more tests failed. Download the Results artifact for the xcresult bundle.")
// Preserve the app's logs alongside the results so that they can be uploaded as artifacts.
logger.info("🗂️ Collecting log files…")
@@ -47,6 +48,7 @@ struct IntegrationTests: AsyncParsableCommand {
} catch {
testsFailed = true
logger.error("❌ Logs are not set to the trace level.")
CI.annotateError(title: "Logs are not set to the trace level", "The tests passed, this is a logging failure.")
}
do {
@@ -56,6 +58,7 @@ struct IntegrationTests: AsyncParsableCommand {
} catch {
testsFailed = true
logger.error("❌ Private messages found in logs.")
CI.annotateError(title: "Private data found in the logs", "A message body was logged. The tests passed, this is a logging failure.")
}
}