@@ -240,59 +240,59 @@ Update the CI workflow definition to run your Playwright tests with the Playwrig
240
240
# [GitHub Actions](#tab/github)
241
241
242
242
` ` ` yml
243
- on:
244
- push:
245
- branches: [ main, master ]
246
- pull_request:
247
- branches: [ main, master ]
248
- permissions: # Required when using AuthType as EntraId
249
- id-token: write
250
- contents: read
251
- jobs:
252
- test:
253
- timeout-minutes: 60
254
- runs-on: ubuntu-latest
255
- steps:
256
- - uses: actions/checkout@v4
257
- # This step is to sign-in to Azure to run tests from GitHub Action workflow.
258
- # Choose how to set up authentication to Azure from GitHub Actions. This is one example.
259
-
260
- - name: Login to Azure with AzPowershell (enableAzPSSession true)
261
- uses: azure/login@v2
262
- with:
263
- client-id: ${{ secrets.AZURE_CLIENT_ID }}
264
- tenant-id: ${{ secrets.AZURE_TENANT_ID }}
265
- subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
266
- enable-AzPSSession: true
267
-
268
- - name: Setup .NET
269
- uses: actions/setup-dotnet@v4
270
- with:
271
- dotnet-version: 8.0.x
272
-
273
- - name: Restore dependencies
274
- run: dotnet restore
275
- working-directory: path/to/playwright/folder # update accordingly
276
-
277
- - name: Build
278
- run: dotnet build --no-restore
279
- working-directory: path/to/playwright/folder # update accordingly
280
-
281
- - name: Run Playwright tests
243
+ on:
244
+ push:
245
+ branches: [ main, master ]
246
+ pull_request:
247
+ branches: [ main, master ]
248
+ permissions: # Required when using AuthType as EntraId
249
+ id-token: write
250
+ contents: read
251
+ jobs:
252
+ test:
253
+ timeout-minutes: 60
254
+ runs-on: ubuntu-latest
255
+ steps:
256
+ - uses: actions/checkout@v4
257
+ # This step is to sign-in to Azure to run tests from GitHub Action workflow.
258
+ # Choose how to set up authentication to Azure from GitHub Actions. This is one example.
259
+
260
+ - name: Login to Azure with AzPowershell (enableAzPSSession true)
261
+ uses: azure/login@v2
262
+ with:
263
+ client-id: ${{ secrets.AZURE_CLIENT_ID }}
264
+ tenant-id: ${{ secrets.AZURE_TENANT_ID }}
265
+ subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
266
+ enable-AzPSSession: true
267
+
268
+ - name: Setup .NET
269
+ uses: actions/setup-dotnet@v4
270
+ with:
271
+ dotnet-version: 8.0.x
272
+
273
+ - name: Restore dependencies
274
+ run: dotnet restore
282
275
working-directory: path/to/playwright/folder # update accordingly
283
- env:
284
- # Regional endpoint for Microsoft Playwright Testing
285
- PLAYWRIGHT_SERVICE_URL: ${{ secrets.PLAYWRIGHT_SERVICE_URL }}
286
- PLAYWRIGHT_SERVICE_RUN_ID: ${{ github.run_id }}-${{ github.run_attempt }}-${{ github.sha }}
287
- run: dotnet test --settings:.runsettings --logger "microsoft-playwright-testing" -- NUnit.NumberOfTestWorkers=20
288
-
289
- - name: Upload Playwright report
290
- uses: actions/upload-artifact@v3
291
- if: always()
292
- with:
293
- name: playwright-report
294
- path: path/to/playwright/folder/playwright-report/ # update accordingly
295
- retention-days: 10
276
+
277
+ - name: Build
278
+ run: dotnet build --no-restore
279
+ working-directory: path/to/playwright/folder # update accordingly
280
+
281
+ - name: Run Playwright tests
282
+ working-directory: path/to/playwright/folder # update accordingly
283
+ env:
284
+ # Regional endpoint for Microsoft Playwright Testing
285
+ PLAYWRIGHT_SERVICE_URL: ${{ secrets.PLAYWRIGHT_SERVICE_URL }}
286
+ PLAYWRIGHT_SERVICE_RUN_ID: ${{ github.run_id }}-${{ github.run_attempt }}-${{ github.sha }}
287
+ run: dotnet test --settings:.runsettings --logger "microsoft-playwright-testing" -- NUnit.NumberOfTestWorkers=20
288
+
289
+ - name: Upload Playwright report
290
+ uses: actions/upload-artifact@v3
291
+ if: always()
292
+ with:
293
+ name: playwright-report
294
+ path: path/to/playwright/folder/playwright-report/ # update accordingly
295
+ retention-days: 10
296
296
` ` `
297
297
298
298
# [Azure Pipelines](#tab/pipelines)
0 commit comments