@@ -132,43 +132,56 @@ private async Task RetryTestWithExponentialBackoff(string testName, Func<Task> t
132132 protected override void Start ( )
133133 {
134134 // Set of tests that use multiple backends.
135- Func < Backend , Task > [ ] multiBackendTests = {
135+ // When running on CI, these tests will be run on all devices
136+ Func < Backend , Task > [ ] basicMultiBackendTests = {
136137 TestCreateModel ,
137138 TestBasicText ,
138139 TestBasicImage ,
139140 TestModelOptions ,
140- TestCountTokens ,
141- #if ! ( FIREBASE_RUNNING_FROM_CI && ! UNITY_EDITOR )
142- // Disabled from CI, because of rate limit issues
141+ TestCountTokens
142+ } ;
143+ // When running on CI, these tests are only run in the Editor
144+ Func < Backend , Task > [ ] editorMultiBackendTests = {
143145 TestMultipleCandidates ,
144146 TestBasicTextStream ,
145147 TestFunctionCallingAny ,
146148 TestFunctionCallingNone ,
147149 TestEnumSchemaResponse ,
148150 TestAnyOfSchemaResponse ,
149- TestSearchGrounding ,
150151 TestChatBasicTextNoHistory ,
151152 TestChatBasicTextPriorHistory ,
152153 TestChatFunctionCalling ,
153154 TestChatBasicTextStream ,
154- TestYoutubeLink ,
155- TestGenerateImage ,
156- TestImagenGenerateImage ,
157- TestImagenGenerateImageOptions ,
158155 TestThinkingBudget ,
159- TestIncludeThoughts ,
160- TestCodeExecution ,
161- TestUrlContext ,
162156 TestTemplateGenerateContent ,
163157 TestTemplateGenerateContentStream ,
164- TestTemplateImagenGenerateImage ,
165158 TestJsonSchemaStructureOutput ,
166159 TestTemplateChat ,
167160 TestTemplateChatStreamAutoFunction ,
168161 TestChatAutoFunctionCalling
169- #endif
170162 } ;
171- // Set of tests that only run the single time.
163+ // When running on CI, these tests aren't run since they are more flakey
164+ Func < Backend , Task > [ ] complexMultiBackendTests = {
165+ TestIncludeThoughts ,
166+ TestYoutubeLink ,
167+ TestGenerateImage ,
168+ TestImagenGenerateImage ,
169+ TestImagenGenerateImageOptions ,
170+ TestSearchGrounding ,
171+ TestCodeExecution ,
172+ TestUrlContext ,
173+ TestTemplateImagenGenerateImage ,
174+ } ;
175+ // Construct the set of tests to run, based on the environment
176+ List < Func < Backend , Task > > multiBackendTests = new ( basicMultiBackendTests ) ;
177+ #if ! ( FIREBASE_RUNNING_FROM_CI && ! UNITY_EDITOR )
178+ multiBackendTests . AddRange ( editorMultiBackendTests ) ;
179+ #endif
180+ #if ! FIREBASE_RUNNING_FROM_CI
181+ multiBackendTests . AddRange ( complexMultiBackendTests ) ;
182+ #endif
183+
184+ // Set of tests that only run the single time, will be run on all devices.
172185 Func < Task > [ ] singleTests = {
173186 TestReadFile ,
174187 TestReadSecureFile ,
0 commit comments