From 0da1d7edd3f0c83c9e5473916880fb938f30ffb1 Mon Sep 17 00:00:00 2001 From: Andrew Heard Date: Mon, 28 Oct 2024 18:26:07 -0400 Subject: [PATCH 1/7] [Vertex AI] Add `VertexAITestApp-SPM.xcscheme` --- .../xcschemes/VertexAITestApp-SPM.xcscheme | 91 +++++++++++++++++++ 1 file changed, 91 insertions(+) create mode 100644 FirebaseVertexAI/Tests/TestApp/VertexAITestApp.xcodeproj/xcshareddata/xcschemes/VertexAITestApp-SPM.xcscheme diff --git a/FirebaseVertexAI/Tests/TestApp/VertexAITestApp.xcodeproj/xcshareddata/xcschemes/VertexAITestApp-SPM.xcscheme b/FirebaseVertexAI/Tests/TestApp/VertexAITestApp.xcodeproj/xcshareddata/xcschemes/VertexAITestApp-SPM.xcscheme new file mode 100644 index 00000000000..21a6a62b52c --- /dev/null +++ b/FirebaseVertexAI/Tests/TestApp/VertexAITestApp.xcodeproj/xcshareddata/xcschemes/VertexAITestApp-SPM.xcscheme @@ -0,0 +1,91 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + From 048ed6b3c7242bdf8bf8564fff85a143bcd9472f Mon Sep 17 00:00:00 2001 From: Andrew Heard Date: Mon, 28 Oct 2024 20:42:59 -0400 Subject: [PATCH 2/7] Revert "[Vertex AI] Add `VertexAITestApp-SPM.xcscheme`" This reverts commit 0da1d7edd3f0c83c9e5473916880fb938f30ffb1. --- .../xcschemes/VertexAITestApp-SPM.xcscheme | 91 ------------------- 1 file changed, 91 deletions(-) delete mode 100644 FirebaseVertexAI/Tests/TestApp/VertexAITestApp.xcodeproj/xcshareddata/xcschemes/VertexAITestApp-SPM.xcscheme diff --git a/FirebaseVertexAI/Tests/TestApp/VertexAITestApp.xcodeproj/xcshareddata/xcschemes/VertexAITestApp-SPM.xcscheme b/FirebaseVertexAI/Tests/TestApp/VertexAITestApp.xcodeproj/xcshareddata/xcschemes/VertexAITestApp-SPM.xcscheme deleted file mode 100644 index 21a6a62b52c..00000000000 --- a/FirebaseVertexAI/Tests/TestApp/VertexAITestApp.xcodeproj/xcshareddata/xcschemes/VertexAITestApp-SPM.xcscheme +++ /dev/null @@ -1,91 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - From 465bad2e1451dbac1f82341d5c6a5e42ecec8ab3 Mon Sep 17 00:00:00 2001 From: Andrew Heard Date: Mon, 28 Oct 2024 20:44:58 -0400 Subject: [PATCH 3/7] Replace `xcpretty` with `xcbeautify` --- scripts/build.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/build.sh b/scripts/build.sh index 0a8cdc857a6..e37496a6fdc 100755 --- a/scripts/build.sh +++ b/scripts/build.sh @@ -105,15 +105,15 @@ esac # Source function to check if CI secrets are available. source scripts/check_secrets.sh -# Runs xcodebuild with the given flags, piping output to xcpretty +# Runs xcodebuild with the given flags, piping output to xcbeautify # If xcodebuild fails with known error codes, retries once. function RunXcodebuild() { echo xcodebuild "$@" - xcpretty_cmd=(xcpretty) + xcbeautify_cmd=(xcbeautify --renderer github-actions) result=0 - xcodebuild "$@" | tee xcodebuild.log | "${xcpretty_cmd[@]}" || result=$? + xcodebuild "$@" | tee xcodebuild.log | "${xcbeautify_cmd[@]}" || result=$? if [[ $result == 65 ]]; then ExportLogs "$@" @@ -122,7 +122,7 @@ function RunXcodebuild() { sleep 5 result=0 - xcodebuild "$@" | tee xcodebuild.log | "${xcpretty_cmd[@]}" || result=$? + xcodebuild "$@" | tee xcodebuild.log | "${xcbeautify_cmd[@]}" || result=$? fi if [[ $result != 0 ]]; then From 50a65a33774cb7f570470abcc6f675050d7a5811 Mon Sep 17 00:00:00 2001 From: Andrew Heard Date: Mon, 28 Oct 2024 21:03:27 -0400 Subject: [PATCH 4/7] Touch Vertex AI test file to trigger tests --- .../Tests/TestApp/Tests/Integration/IntegrationTests.swift | 2 ++ 1 file changed, 2 insertions(+) diff --git a/FirebaseVertexAI/Tests/TestApp/Tests/Integration/IntegrationTests.swift b/FirebaseVertexAI/Tests/TestApp/Tests/Integration/IntegrationTests.swift index b90a13515a6..54d5429e7e7 100644 --- a/FirebaseVertexAI/Tests/TestApp/Tests/Integration/IntegrationTests.swift +++ b/FirebaseVertexAI/Tests/TestApp/Tests/Integration/IntegrationTests.swift @@ -18,6 +18,8 @@ import FirebaseStorage import FirebaseVertexAI import XCTest +// TODO(andrewheard): Remove this after testing on CI. + @available(iOS 15.0, macOS 12.0, macCatalyst 15.0, tvOS 15.0, watchOS 8.0, *) final class IntegrationTests: XCTestCase { // Set temperature, topP and topK to lowest allowed values to make responses more deterministic. From 1987f05b3fb337d2c56202840711e91492607d7c Mon Sep 17 00:00:00 2001 From: Andrew Heard Date: Mon, 28 Oct 2024 21:40:38 -0400 Subject: [PATCH 5/7] Add intentionally failing test to try xcbeautify GHA renderer --- .../Tests/TestApp/Tests/Integration/IntegrationTests.swift | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/FirebaseVertexAI/Tests/TestApp/Tests/Integration/IntegrationTests.swift b/FirebaseVertexAI/Tests/TestApp/Tests/Integration/IntegrationTests.swift index 54d5429e7e7..4080e38027e 100644 --- a/FirebaseVertexAI/Tests/TestApp/Tests/Integration/IntegrationTests.swift +++ b/FirebaseVertexAI/Tests/TestApp/Tests/Integration/IntegrationTests.swift @@ -18,8 +18,6 @@ import FirebaseStorage import FirebaseVertexAI import XCTest -// TODO(andrewheard): Remove this after testing on CI. - @available(iOS 15.0, macOS 12.0, macCatalyst 15.0, tvOS 15.0, watchOS 8.0, *) final class IntegrationTests: XCTestCase { // Set temperature, topP and topK to lowest allowed values to make responses more deterministic. @@ -66,6 +64,11 @@ final class IntegrationTests: XCTestCase { storage = Storage.storage() } + // TODO(andrewheard): Remove this after testing on CI. + func testIntentionallyFailing() { + XCTFail("Intentionally failing to try the xcbeautify GitHub Actions renderer.") + } + // MARK: - Generate Content func testGenerateContent() async throws { From 3a7a4c2df5a41fa511dee5108e908e7a23d72f16 Mon Sep 17 00:00:00 2001 From: Andrew Heard Date: Mon, 28 Oct 2024 22:04:43 -0400 Subject: [PATCH 6/7] Revert "Add intentionally failing test to try xcbeautify GHA renderer" This reverts commit 1987f05b3fb337d2c56202840711e91492607d7c. --- .../Tests/TestApp/Tests/Integration/IntegrationTests.swift | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/FirebaseVertexAI/Tests/TestApp/Tests/Integration/IntegrationTests.swift b/FirebaseVertexAI/Tests/TestApp/Tests/Integration/IntegrationTests.swift index 4080e38027e..54d5429e7e7 100644 --- a/FirebaseVertexAI/Tests/TestApp/Tests/Integration/IntegrationTests.swift +++ b/FirebaseVertexAI/Tests/TestApp/Tests/Integration/IntegrationTests.swift @@ -18,6 +18,8 @@ import FirebaseStorage import FirebaseVertexAI import XCTest +// TODO(andrewheard): Remove this after testing on CI. + @available(iOS 15.0, macOS 12.0, macCatalyst 15.0, tvOS 15.0, watchOS 8.0, *) final class IntegrationTests: XCTestCase { // Set temperature, topP and topK to lowest allowed values to make responses more deterministic. @@ -64,11 +66,6 @@ final class IntegrationTests: XCTestCase { storage = Storage.storage() } - // TODO(andrewheard): Remove this after testing on CI. - func testIntentionallyFailing() { - XCTFail("Intentionally failing to try the xcbeautify GitHub Actions renderer.") - } - // MARK: - Generate Content func testGenerateContent() async throws { From ad1df7c0ee0f1eb278127d7e1f51c40c84232978 Mon Sep 17 00:00:00 2001 From: Andrew Heard Date: Tue, 29 Oct 2024 14:58:57 -0400 Subject: [PATCH 7/7] Remove TODO --- .../Tests/TestApp/Tests/Integration/IntegrationTests.swift | 2 -- 1 file changed, 2 deletions(-) diff --git a/FirebaseVertexAI/Tests/TestApp/Tests/Integration/IntegrationTests.swift b/FirebaseVertexAI/Tests/TestApp/Tests/Integration/IntegrationTests.swift index 54d5429e7e7..b90a13515a6 100644 --- a/FirebaseVertexAI/Tests/TestApp/Tests/Integration/IntegrationTests.swift +++ b/FirebaseVertexAI/Tests/TestApp/Tests/Integration/IntegrationTests.swift @@ -18,8 +18,6 @@ import FirebaseStorage import FirebaseVertexAI import XCTest -// TODO(andrewheard): Remove this after testing on CI. - @available(iOS 15.0, macOS 12.0, macCatalyst 15.0, tvOS 15.0, watchOS 8.0, *) final class IntegrationTests: XCTestCase { // Set temperature, topP and topK to lowest allowed values to make responses more deterministic.