@@ -297,10 +297,31 @@ stages:
297297 matrix :
298298 # Windows:
299299 # vmImage: 'windows-latest'
300- Linux :
300+ # We split the tests into 3 parts for each OS to reduce the time it takes to run them on the pipeline
301+ LinuxPart1Of3 :
301302 vmImage : " ubuntu-24.04"
302- macOS :
303+ # Filter tests that are part of the Umbraco.Infrastructure namespace but not part of the Umbraco.Infrastructure.Service namespace
304+ testFilter : ' (FullyQualifiedName~Umbraco.Infrastructure) & (FullyQualifiedName!~Umbraco.Infrastructure.Service)'
305+ LinuxPart2Of3 :
306+ vmImage : " ubuntu-24.04"
307+ # Filter tests that are part of the Umbraco.Infrastructure.Service namespace
308+ testFilter : ' (FullyQualifiedName~Umbraco.Infrastructure.Service)'
309+ LinuxPart3Of3 :
310+ vmImage : " ubuntu-24.04"
311+ # Filter tests that are not part of the Umbraco.Infrastructure namespace. So this will run all tests that are not part of the Umbraco.Infrastructure namespace
312+ testFilter : ' (FullyQualifiedName!~Umbraco.Infrastructure)'
313+ macOSPart1Of3 :
314+ vmImage : " macOS-latest"
315+ # Filter tests that are part of the Umbraco.Infrastructure namespace but not part of the Umbraco.Infrastructure.Service namespace
316+ testFilter : ' (FullyQualifiedName~Umbraco.Infrastructure) & (FullyQualifiedName!~Umbraco.Infrastructure.Service)'
317+ macOSPart2Of3 :
303318 vmImage : " macOS-latest"
319+ # Filter tests that are part of the Umbraco.Infrastructure.Service namespace
320+ testFilter : ' (FullyQualifiedName~Umbraco.Infrastructure.Service)'
321+ macOSPart3Of3 :
322+ vmImage : " macOS-latest"
323+ # Filter tests that are not part of the Umbraco.Infrastructure namespace.
324+ testFilter : ' (FullyQualifiedName!~Umbraco.Infrastructure)'
304325 pool :
305326 vmImage : $(vmImage)
306327 variables :
@@ -331,14 +352,13 @@ stages:
331352 projects : " tests/Umbraco.Tests.Integration/Umbraco.Tests.Integration.csproj"
332353 testRunTitle : Integration Tests SQLite - $(Agent.OS)
333354 ${{ if and(eq(variables['Agent.OS'],'Windows_NT'), or(variables.releaseTestFilter, parameters.forceReleaseTestFilter)) }} :
334- arguments : " --configuration $(buildConfiguration) --no-build ${{parameters.integrationReleaseTestFilter}}"
355+ arguments : ' --filter "$(testFilter)" --configuration $(buildConfiguration) --no-build ${{parameters.integrationReleaseTestFilter}}'
335356 ${{ elseif eq(variables['Agent.OS'],'Windows_NT') }} :
336- arguments : " --configuration $(buildConfiguration) --no-build ${{parameters.integrationNonReleaseTestFilter}}"
357+ arguments : ' --filter "$(testFilter)" --configuration $(buildConfiguration) --no-build ${{parameters.integrationNonReleaseTestFilter}}'
337358 ${{ elseif or(variables.releaseTestFilter, parameters.forceReleaseTestFilter) }} :
338- arguments : " --configuration $(buildConfiguration) --no-build ${{parameters.nonWindowsIntegrationReleaseTestFilter}}"
359+ arguments : ' --filter "$(testFilter)" --configuration $(buildConfiguration) --no-build ${{parameters.nonWindowsIntegrationReleaseTestFilter}}'
339360 ${{ else }} :
340- arguments : " --configuration $(buildConfiguration) --no-build ${{parameters.nonWindowsIntegrationNonReleaseTestFilter}}"
341-
361+ arguments : ' --filter "$(testFilter)" --configuration $(buildConfiguration) --no-build ${{parameters.nonWindowsIntegrationNonReleaseTestFilter}}'
342362 # Integration Tests (SQL Server)
343363 - job :
344364 timeoutInMinutes : 180
@@ -347,15 +367,46 @@ stages:
347367 displayName : Integration Tests (SQL Server)
348368 strategy :
349369 matrix :
350- Windows :
370+ # We split the tests into 3 parts for each OS to reduce the time it takes to run them on the pipeline
371+ WindowsPart1Of3 :
351372 vmImage : " windows-latest"
352373 Tests__Database__DatabaseType : LocalDb
353374 Tests__Database__SQLServerMasterConnectionString : N/A
354- Linux :
375+ # Filter tests that are part of the Umbraco.Infrastructure namespace but not part of the Umbraco.Infrastructure.Service namespace
376+ testFilter : ' (FullyQualifiedName~Umbraco.Infrastructure) & (FullyQualifiedName!~Umbraco.Infrastructure.Service)'
377+ WindowsPart2Of3 :
378+ vmImage : " windows-latest"
379+ Tests__Database__DatabaseType : LocalDb
380+ Tests__Database__SQLServerMasterConnectionString : N/A
381+ # Filter tests that are part of the Umbraco.Infrastructure.Service namespace
382+ testFilter : ' (FullyQualifiedName~Umbraco.Infrastructure.Service)'
383+ WindowsPart3Of3 :
384+ vmImage : " windows-latest"
385+ Tests__Database__DatabaseType : LocalDb
386+ Tests__Database__SQLServerMasterConnectionString : N/A
387+ # Filter tests that are not part of the Umbraco.Infrastructure namespace. So this will run all tests that are not part of the Umbraco.Infrastructure namespace
388+ testFilter : ' (FullyQualifiedName!~Umbraco.Infrastructure)'
389+ LinuxPart1Of3 :
390+ vmImage : " ubuntu-latest"
391+ SA_PASSWORD : UmbracoIntegration123!
392+ Tests__Database__DatabaseType : SqlServer
393+ Tests__Database__SQLServerMasterConnectionString : " Server=(local);User Id=sa;Password=$(SA_PASSWORD);TrustServerCertificate=True"
394+ # Filter tests that are part of the Umbraco.Infrastructure namespace but not part of the Umbraco.Infrastructure.Service namespace
395+ testFilter : ' (FullyQualifiedName~Umbraco.Infrastructure) & (FullyQualifiedName!~Umbraco.Infrastructure.Service)'
396+ LinuxPart2Of3 :
397+ vmImage : " ubuntu-latest"
398+ SA_PASSWORD : UmbracoIntegration123!
399+ Tests__Database__DatabaseType : SqlServer
400+ Tests__Database__SQLServerMasterConnectionString : " Server=(local);User Id=sa;Password=$(SA_PASSWORD);TrustServerCertificate=True"
401+ # Filter tests that are part of the Umbraco.Infrastructure.Service namespace
402+ testFilter : ' (FullyQualifiedName~Umbraco.Infrastructure.Service)'
403+ LinuxPart3Of3 :
355404 vmImage : " ubuntu-latest"
356405 SA_PASSWORD : UmbracoIntegration123!
357406 Tests__Database__DatabaseType : SqlServer
358407 Tests__Database__SQLServerMasterConnectionString : " Server=(local);User Id=sa;Password=$(SA_PASSWORD);TrustServerCertificate=True"
408+ # Filter tests that are not part of the Umbraco.Infrastructure namespace. So this will run all tests that are not part of the Umbraco.Infrastructure namespace
409+ testFilter : ' (FullyQualifiedName!~Umbraco.Infrastructure)'
359410 pool :
360411 vmImage : $(vmImage)
361412 steps :
@@ -388,13 +439,13 @@ stages:
388439 projects : " tests/Umbraco.Tests.Integration/Umbraco.Tests.Integration.csproj"
389440 testRunTitle : Integration Tests SQL Server - $(Agent.OS)
390441 ${{ if and(eq(variables['Agent.OS'],'Windows_NT'), or(variables.releaseTestFilter, parameters.forceReleaseTestFilter)) }} :
391- arguments : " --configuration $(buildConfiguration) --no-build ${{parameters.integrationReleaseTestFilter}}"
442+ arguments : ' --filter "$(testFilter)" --configuration $(buildConfiguration) --no-build ${{parameters.integrationReleaseTestFilter}}'
392443 ${{ elseif eq(variables['Agent.OS'],'Windows_NT') }} :
393- arguments : " --configuration $(buildConfiguration) --no-build ${{parameters.integrationNonReleaseTestFilter}}"
444+ arguments : ' --filter "$(testFilter)" --configuration $(buildConfiguration) --no-build ${{parameters.integrationNonReleaseTestFilter}}'
394445 ${{ elseif or(variables.releaseTestFilter, parameters.forceReleaseTestFilter) }} :
395- arguments : " --configuration $(buildConfiguration) --no-build ${{parameters.nonWindowsIntegrationReleaseTestFilter}}"
446+ arguments : ' --filter "$(testFilter)" --configuration $(buildConfiguration) --no-build ${{parameters.nonWindowsIntegrationReleaseTestFilter}}'
396447 ${{ else }} :
397- arguments : " --configuration $(buildConfiguration) --no-build ${{parameters.nonWindowsIntegrationNonReleaseTestFilter}}"
448+ arguments : ' --filter "$(testFilter)" --configuration $(buildConfiguration) --no-build ${{parameters.nonWindowsIntegrationNonReleaseTestFilter}}'
398449
399450 # Stop SQL Server
400451 - pwsh : docker stop mssql
0 commit comments