@@ -160,15 +160,39 @@ extends:
160160 demands : ImageOverride -equals 1es-ubuntu-2204
161161 os : linux
162162 variables :
163+ - _runCounter : $[counter(variables['Build.Reason'], 0)]
163164 # Rely on task Arcade injects, not auto-injected build step.
164165 - skipComponentGovernanceDetection : true
166+ - ${{ if notin(variables['Build.Reason'], 'PullRequest', 'Schedule') }} :
167+ - _CosmosConnectionUrl : ' true'
165168 steps :
169+ - bash : |
170+ echo "##vso[task.setvariable variable=_CosmosConnectionUrl]https://ef-nightly-test.documents.azure.com:443/"
171+ displayName: Prepare to run Cosmos tests on ef-nightly-test
172+ condition: and(eq(variables['_CosmosConnectionUrl'], 'true'), or(endsWith(variables['_runCounter'], '0'), endsWith(variables['_runCounter'], '2'), endsWith(variables['_runCounter'], '4'), endsWith(variables['_runCounter'], '6'), endsWith(variables['_runCounter'], '8')))
173+ - bash : |
174+ echo "##vso[task.setvariable variable=_CosmosConnectionUrl]https://ef-pr-test.documents.azure.com:443/"
175+ displayName: Prepare to run Cosmos tests on ef-pr-test
176+ condition: and(eq(variables['_CosmosConnectionUrl'], 'true'), or(endsWith(variables['_runCounter'], '1'), endsWith(variables['_runCounter'], '3'), endsWith(variables['_runCounter'], '5'), endsWith(variables['_runCounter'], '7'), endsWith(variables['_runCounter'], '9')))
166177 - template : /eng/common/templates-official/steps/enable-internal-sources.yml
167178 - template : /eng/common/templates-official/steps/enable-internal-runtimes.yml
168179 - script : eng/common/build.sh --restore --build --test --pack --ci --configuration $(_BuildConfig) --prepareMachine $(_InternalRuntimeDownloadArgs)
169180 displayName : Build
181+ - task : AzureCLI@2
182+ displayName : Run Cosmos tests
183+ condition : notin(variables['Build.Reason'], 'PullRequest', 'Schedule')
184+ inputs :
185+ azureSubscription : EFCosmosTesting
186+ addSpnToEnvironment : true
187+ scriptType : bash
188+ scriptLocation : ' inlineScript'
189+ inlineScript : |
190+ ./test.sh --ci --configuration $(_BuildConfig) --projects $(Build.SourcesDirectory)/test/EFCore.Cosmos.FunctionalTests/EFCore.Cosmos.FunctionalTests.csproj
170191 env :
171192 Test__Cosmos__DefaultConnection : $(_CosmosConnectionUrl)
193+ Test__Cosmos__UseTokenCredential : true
194+ Test__Cosmos__SubscriptionId : d709b837-4a74-4aec-addc-b6e4b9b23e7e
195+ Test__Cosmos__ResourceGroup : efcosmosci
172196 name : Build
173197 templateContext :
174198 sdl :
0 commit comments