@@ -23,12 +23,6 @@ variables:
2323 npm_config_cache : $(Pipeline.Workspace)/.npm_client
2424 NODE_OPTIONS : --max_old_space_size=16384
2525
26- parameters :
27- - name : runSmokeTests
28- displayName : Run the smoke tests
29- type : boolean
30- default : false
31-
3226stages :
3327 # ##############################################
3428 # # Build
@@ -115,10 +109,24 @@ stages:
115109 CONNECTIONSTRINGS__UMBRACODBDSN_PROVIDERNAME : Microsoft.Data.Sqlite
116110 strategy :
117111 matrix :
118- Linux :
119- vmImage : ' ubuntu-latest'
120- Windows :
121- vmImage : ' windows-latest'
112+ LinuxPart1Of3 :
113+ vmImage : " ubuntu-latest"
114+ testCommand : " npx playwright test DefaultConfig --shard=1/3"
115+ LinuxPart2Of3 :
116+ vmImage : " ubuntu-latest"
117+ testCommand : " npx playwright test DefaultConfig --shard=2/3"
118+ LinuxPart3Of3 :
119+ vmImage : " ubuntu-latest"
120+ testCommand : " npx playwright test DefaultConfig --shard=3/3"
121+ WindowsPart1Of3 :
122+ vmImage : " windows-latest"
123+ testCommand : " npx playwright test DefaultConfig --shard=1/3"
124+ WindowsPart2Of3 :
125+ vmImage : " windows-latest"
126+ testCommand : " npx playwright test DefaultConfig --shard=2/3"
127+ WindowsPart3Of3 :
128+ vmImage : " windows-latest"
129+ testCommand : " npx playwright test DefaultConfig --shard=3/3"
122130 pool :
123131 vmImage : $(vmImage)
124132 steps :
@@ -206,10 +214,7 @@ stages:
206214 workingDirectory : tests/Umbraco.Tests.AcceptanceTest
207215
208216 # Test
209- - ${{ if eq(parameters.runSmokeTests, true) }} :
210- pwsh : npm run smokeTestSqlite --ignore-certificate-errors
211- ${{ else }} :
212- pwsh : npm run testSqlite --ignore-certificate-errors
217+ - pwsh : $(testCommand)
213218 displayName : Run Playwright tests
214219 continueOnError : true
215220 workingDirectory : tests/Umbraco.Tests.AcceptanceTest
@@ -252,12 +257,30 @@ stages:
252257 CONNECTIONSTRINGS__UMBRACODBDSN_PROVIDERNAME : Microsoft.Data.SqlClient
253258 strategy :
254259 matrix :
255- Linux :
256- vmImage : ' ubuntu-latest'
260+ LinuxPart1Of3 :
261+ testCommand : " npx playwright test DefaultConfig --grep-invert \" Users\" --shard=1/3"
262+ vmImage : " ubuntu-latest"
263+ SA_PASSWORD : $(UMBRACO__CMS__UNATTENDED__UNATTENDEDUSERPASSWORD)
264+ CONNECTIONSTRINGS__UMBRACODBDSN : " Server=(local);Database=Umbraco;User Id=sa;Password=$(SA_PASSWORD);TrustServerCertificate=True"
265+ LinuxPart2Of3 :
266+ testCommand : " npx playwright test DefaultConfig --grep-invert \" Users\" --shard=2/3"
267+ vmImage : " ubuntu-latest"
268+ SA_PASSWORD : $(UMBRACO__CMS__UNATTENDED__UNATTENDEDUSERPASSWORD)
269+ CONNECTIONSTRINGS__UMBRACODBDSN : " Server=(local);Database=Umbraco;User Id=sa;Password=$(SA_PASSWORD);TrustServerCertificate=True"
270+ LinuxPart3Of3 :
271+ testCommand : " npx playwright test DefaultConfig --grep-invert \" Users\" --shard=3/3"
272+ vmImage : " ubuntu-latest"
257273 SA_PASSWORD : $(UMBRACO__CMS__UNATTENDED__UNATTENDEDUSERPASSWORD)
258- CONNECTIONSTRINGS__UMBRACODBDSN : ' Server=(local);Database=Umbraco;User Id=sa;Password=$(SA_PASSWORD);TrustServerCertificate=True'
259- Windows :
260- vmImage : ' windows-latest'
274+ CONNECTIONSTRINGS__UMBRACODBDSN : " Server=(local);Database=Umbraco;User Id=sa;Password=$(SA_PASSWORD);TrustServerCertificate=True"
275+ WindowsPart1Of3 :
276+ vmImage : " windows-latest"
277+ testCommand : " npx playwright test DefaultConfig --grep-invert \" Users\" --shard=1/3"
278+ WindowsPart2Of3 :
279+ vmImage : " windows-latest"
280+ testCommand : " npx playwright test DefaultConfig --grep-invert \" Users\" --shard=2/3"
281+ WindowsPart3Of3 :
282+ vmImage : " windows-latest"
283+ testCommand : " npx playwright test DefaultConfig --grep-invert \" Users\" --shard=3/3"
261284 pool :
262285 vmImage : $(vmImage)
263286 steps :
@@ -353,10 +376,7 @@ stages:
353376 workingDirectory : tests/Umbraco.Tests.AcceptanceTest
354377
355378 # Test
356- - ${{ if eq(parameters.runSmokeTests, true) }} :
357- pwsh : npm run smokeTest --ignore-certificate-errors
358- ${{ else }} :
359- pwsh : npm run test --ignore-certificate-errors
379+ - pwsh : $(testCommand)
360380 displayName : Run Playwright tests
361381 continueOnError : true
362382 workingDirectory : tests/Umbraco.Tests.AcceptanceTest
0 commit comments