From b6b72597c1788c74cfe6ab6937cbadba0b622c38 Mon Sep 17 00:00:00 2001 From: Puneet Agarwal <28705989+puagarwa@users.noreply.github.com> Date: Fri, 27 Oct 2023 18:23:35 +0530 Subject: [PATCH 1/5] increase actionTimeout to 10s --- playwright.service.config.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/playwright.service.config.ts b/playwright.service.config.ts index 9538a8df..50f0f068 100644 --- a/playwright.service.config.ts +++ b/playwright.service.config.ts @@ -30,9 +30,9 @@ const os = process.env.PLAYWRIGHT_SERVICE_OS || 'linux'; export default defineConfig(config, { // Define more generous timeout for the service operation if necessary. // timeout: 60000, - // expect: { - // timeout: 10000, - // }, + expect: { + timeout: 10000, + }, workers: 20, // Enable screenshot testing and configure directory with expectations. From ca7bf15175845222ffef69ca4195b341ed7f2d6f Mon Sep 17 00:00:00 2001 From: Puneet Agarwal <28705989+puagarwa@users.noreply.github.com> Date: Fri, 27 Oct 2023 18:27:24 +0530 Subject: [PATCH 2/5] Update playwright.yml --- .github/workflows/playwright.yml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/playwright.yml b/.github/workflows/playwright.yml index 3b863920..7d69ad9e 100644 --- a/.github/workflows/playwright.yml +++ b/.github/workflows/playwright.yml @@ -4,6 +4,7 @@ on: push: branches: - main + - main2 pull_request: branches: [main] @@ -12,15 +13,15 @@ jobs: strategy: fail-fast: false matrix: - shard: [1/4, 2/4, 3/4, 4/4] + shard: [1] runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - uses: actions/setup-node@v3 - name: Install dependencies run: npm ci - - name: Install Playwright browsers - run: npx playwright install --with-deps + #- name: Install Playwright browsers NO need to install browsers for service + #run: npx playwright install --with-deps - name: Run Playwright tests run: npx playwright test --shard ${{ matrix.shard }} @@ -35,7 +36,7 @@ jobs: merge-reports: # Merge reports after playwright-tests, even if some shards have failed - if: always() + if: false # No need to merge needs: [test] runs-on: ubuntu-latest From 7ea125d3148a1982ac50a026795a566d9a37b187 Mon Sep 17 00:00:00 2001 From: Puneet Agarwal <28705989+puagarwa@users.noreply.github.com> Date: Fri, 27 Oct 2023 18:29:54 +0530 Subject: [PATCH 3/5] Update playwright.yml --- .github/workflows/playwright.yml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/workflows/playwright.yml b/.github/workflows/playwright.yml index 7d69ad9e..5b146c79 100644 --- a/.github/workflows/playwright.yml +++ b/.github/workflows/playwright.yml @@ -13,7 +13,7 @@ jobs: strategy: fail-fast: false matrix: - shard: [1] + shard: [1] # Running all test in single run runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 @@ -24,7 +24,13 @@ jobs: #run: npx playwright install --with-deps - name: Run Playwright tests - run: npx playwright test --shard ${{ matrix.shard }} + working-directory: ./ + env: + # Access token and regional endpoint for Microsoft Playwright Testing + PLAYWRIGHT_SERVICE_ACCESS_TOKEN: ${{ secrets.PLAYWRIGHT_SERVICE_ACCESS_TOKEN }} + PLAYWRIGHT_SERVICE_URL: ${{ secrets.PLAYWRIGHT_SERVICE_URL }} + PLAYWRIGHT_SERVICE_RUN_ID: ${{ github.run_id }}-${{ github.run_attempt }}-${{ github.sha }} + run: npx playwright test -c playwright.service.config.ts - name: Upload blob report to GitHub Actions Artifacts if: always() From 758ff648fbf05865a32b26143c9d82df5291af81 Mon Sep 17 00:00:00 2001 From: Puneet Agarwal <28705989+puagarwa@users.noreply.github.com> Date: Fri, 27 Oct 2023 18:39:05 +0530 Subject: [PATCH 4/5] Update playwright.service.config.ts --- playwright.service.config.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/playwright.service.config.ts b/playwright.service.config.ts index 50f0f068..c7dfcb76 100644 --- a/playwright.service.config.ts +++ b/playwright.service.config.ts @@ -31,9 +31,9 @@ export default defineConfig(config, { // Define more generous timeout for the service operation if necessary. // timeout: 60000, expect: { - timeout: 10000, + timeout: 20000, }, - workers: 20, + workers: 8, // Enable screenshot testing and configure directory with expectations. // https://learn.microsoft.com/azure/playwright-testing/how-to-configure-visual-comparisons From a8cfbd6450f5c8c6bda5fdb614f35c2f6b4d8cc5 Mon Sep 17 00:00:00 2001 From: Puneet Agarwal <28705989+puagarwa@users.noreply.github.com> Date: Fri, 27 Oct 2023 18:51:59 +0530 Subject: [PATCH 5/5] Update playwright.yml --- .github/workflows/playwright.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/playwright.yml b/.github/workflows/playwright.yml index 5b146c79..e8da119a 100644 --- a/.github/workflows/playwright.yml +++ b/.github/workflows/playwright.yml @@ -4,7 +4,6 @@ on: push: branches: - main - - main2 pull_request: branches: [main]