Skip to content

Commit

Permalink
[Communication] - Divide live test pipeline for each SDK (#20902)
Browse files Browse the repository at this point in the history
* Divide live test pipeline

* Divide live test pipeline

* Fix pipeline

* Adding eng pipeline changes

* Fix pipeline

* Fix ci pipeline

* Fix ci pipeline

* Fix ci pipeline

* Adding separate yaml files

* Setting template as absolute path

* Fix path

* Fix path

* Fix path

* Fix default value

* Revert tests.yml

Co-authored-by: Minnie Liu <peiliu@microsoft.com>
  • Loading branch information
minnieliu and Minnie Liu authored May 11, 2021
1 parent b140b95 commit 2f3fb58
Show file tree
Hide file tree
Showing 7 changed files with 83 additions and 6 deletions.
4 changes: 4 additions & 0 deletions eng/pipelines/templates/jobs/live.tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ parameters:
- name: ServiceDirectory
type: string
default: not-specified
- name: Project
type: string
default: '**'
- name: TestSetupSteps
type: stepList
default: []
Expand Down Expand Up @@ -112,6 +115,7 @@ jobs:
--logger:"console;verbosity=normal"
/p:SDKType=${{ parameters.SDKType }}
/p:ServiceDirectory=${{ parameters.ServiceDirectory }}
/p:Project=${{ parameters.Project }}
/p:IncludeSrc=false /p:IncludeSamples=false /p:IncludePerf=false /p:IncludeStress=false
/p:BuildInParallel=${{ parameters.BuildInParallel }}
$(AdditionalTestArguments)
Expand Down
4 changes: 4 additions & 0 deletions eng/pipelines/templates/stages/archetype-sdk-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@ parameters:
- name: ServiceDirectory
type: string
default: not-specified
- name: Project
type: string
default: '**'
- name: TestSetupSteps
type: stepList
default: []
Expand Down Expand Up @@ -124,6 +127,7 @@ stages:
Location: ${{ parameters.Location }}
SDKType: ${{ parameters.SDKType }}
ServiceDirectory: ${{ parameters.ServiceDirectory }}
Project: ${{ parameters.Project }}
TestSetupSteps: ${{ parameters.TestSetupSteps }}
MatrixConfigs:
# Enumerate platforms and additional platforms based on supported clouds (sparse platform<-->cloud matrix).
Expand Down
13 changes: 7 additions & 6 deletions eng/service.proj
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
<SDKType Condition="'$(SDKType)' == ''">all</SDKType>
<ServiceDirectory Condition="'$(ServiceDirectory)' == '' and '$(Scope)' != ''">$(Scope)</ServiceDirectory>
<ServiceDirectory Condition="'$(ServiceDirectory)' == ''">*</ServiceDirectory>
<Project Condition="'$(Project)' == ''">**</Project>
<IncludeTests Condition="'$(IncludeTests)' == ''">true</IncludeTests>
<IncludeSrc Condition="'$(IncludeSrc)' == ''">true</IncludeSrc>
<IncludeSamples Condition="'$(IncludeSamples)' == ''">true</IncludeSamples>
Expand All @@ -14,12 +15,12 @@

<ItemGroup>
<MgmtExcludePaths Include="$(MSBuildThisFileDirectory)..\sdk\*\Microsoft.*.Management.*\**\*.csproj;$(MSBuildThisFileDirectory)..\sdk\*mgmt*\**\*.csproj" />
<TestProjects Include="..\sdk\$(ServiceDirectory)\**\tests\**\*.csproj" />
<SamplesProjects Include="..\sdk\$(ServiceDirectory)\**\samples\**\*.csproj" />
<PerfProjects Include="..\sdk\$(ServiceDirectory)\**\perf\**\*.csproj" />
<StressProjects Include="..\sdk\$(ServiceDirectory)\**\stress\**\*.csproj" />
<TestProjects Include="..\sdk\$(ServiceDirectory)\$(Project)\tests\**\*.csproj" />
<SamplesProjects Include="..\sdk\$(ServiceDirectory)\$(Project)\samples\**\*.csproj" />
<PerfProjects Include="..\sdk\$(ServiceDirectory)\$(Project)\perf\**\*.csproj" />
<StressProjects Include="..\sdk\$(ServiceDirectory)\$(Project)\stress\**\*.csproj" />
<SampleApplications Include="..\samples\**\*.csproj" />
<SrcProjects Include="..\sdk\$(ServiceDirectory)\**\*.csproj" Exclude="@(TestProjects);@(SamplesProjects)"/>
<SrcProjects Include="..\sdk\$(ServiceDirectory)\$(Project)\*.csproj" Exclude="@(TestProjects);@(SamplesProjects)"/>
<ProjectReference Include="@(TestProjects)" Exclude="@(MgmtExcludePaths)" Condition="'$(IncludeTests)' == 'true'" />
<ProjectReference Include="@(SamplesProjects)" Exclude="@(MgmtExcludePaths)" Condition="'$(IncludeSamples)' == 'true'" />
<ProjectReference Include="@(PerfProjects)" Exclude="@(MgmtExcludePaths)" Condition="'$(IncludePerf)' == 'true'" />
Expand All @@ -39,7 +40,7 @@
<Target Name="CheckProjects" AfterTargets="Build">
<!-- If scope is set this likely came from a call to build.proj and in cases where there is only mgmt projects we don't want to error so skip this extra check -->
<Error Condition="'$(Scope)' == '' and '@(ProjectReference)' == ''"
Text="No Projects found with patttern [..\sdk\$(ServiceDirectory)\**\*.csproj], please make sure you have passed in the correct ServiceDirectory." />
Text="No Projects found with patttern [..\sdk\$(ServiceDirectory)\$(Project)\*.csproj], please make sure you have passed in the correct ServiceDirectory." />
</Target>

<Target Name="GenerateCode">
Expand Down
17 changes: 17 additions & 0 deletions sdk/communication/Azure.Communication.Chat/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
trigger: none

extends:
template: /eng/pipelines/templates/stages/archetype-sdk-tests.yml
parameters:
ServiceDirectory: communication
Project: Azure.Communication.Chat
CloudConfig:
Public:
SubscriptionConfigurations:
- $(sub-config-azure-cloud-test-resources)
- $(sub-config-communication-services-cloud-test-resources-common)
- $(sub-config-communication-services-cloud-test-resources-net)
Clouds: Public
EnvVars:
# SKIP_PHONENUMBER_LIVE_TESTS skips certain phone number tests such as purchase and release
SKIP_PHONENUMBER_LIVE_TESTS: TRUE
17 changes: 17 additions & 0 deletions sdk/communication/Azure.Communication.Identity/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
trigger: none

extends:
template: /eng/pipelines/templates/stages/archetype-sdk-tests.yml
parameters:
ServiceDirectory: communication
Project: Azure.Communication.Identity
CloudConfig:
Public:
SubscriptionConfigurations:
- $(sub-config-azure-cloud-test-resources)
- $(sub-config-communication-services-cloud-test-resources-common)
- $(sub-config-communication-services-cloud-test-resources-net)
Clouds: Public
EnvVars:
# SKIP_PHONENUMBER_LIVE_TESTS skips certain phone number tests such as purchase and release
SKIP_PHONENUMBER_LIVE_TESTS: TRUE
17 changes: 17 additions & 0 deletions sdk/communication/Azure.Communication.PhoneNumbers/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
trigger: none

extends:
template: /eng/pipelines/templates/stages/archetype-sdk-tests.yml
parameters:
ServiceDirectory: communication
Project: Azure.Communication.PhoneNumbers
CloudConfig:
Public:
SubscriptionConfigurations:
- $(sub-config-azure-cloud-test-resources)
- $(sub-config-communication-services-cloud-test-resources-common)
- $(sub-config-communication-services-cloud-test-resources-net)
Clouds: Public
EnvVars:
# SKIP_PHONENUMBER_LIVE_TESTS skips certain phone number tests such as purchase and release
SKIP_PHONENUMBER_LIVE_TESTS: TRUE
17 changes: 17 additions & 0 deletions sdk/communication/Azure.Communication.Sms/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
trigger: none

extends:
template: /eng/pipelines/templates/stages/archetype-sdk-tests.yml
parameters:
ServiceDirectory: communication
Project: Azure.Communication.Sms
CloudConfig:
Public:
SubscriptionConfigurations:
- $(sub-config-azure-cloud-test-resources)
- $(sub-config-communication-services-cloud-test-resources-common)
- $(sub-config-communication-services-cloud-test-resources-net)
Clouds: Public
EnvVars:
# SKIP_PHONENUMBER_LIVE_TESTS skips certain phone number tests such as purchase and release
SKIP_PHONENUMBER_LIVE_TESTS: TRUE

0 comments on commit 2f3fb58

Please sign in to comment.