From accd32f752a902406ed521f5eeb65cfad9d0fc85 Mon Sep 17 00:00:00 2001 From: Cursor Agent Date: Thu, 30 Apr 2026 21:54:22 +0000 Subject: [PATCH 1/3] feat: add scheduled Playwright tests workflow with shard approach Co-authored-by: Pavel Tiunov --- .github/workflows/scheduled-playwright.yml | 118 +++++++++++++++++++++ 1 file changed, 118 insertions(+) create mode 100644 .github/workflows/scheduled-playwright.yml diff --git a/.github/workflows/scheduled-playwright.yml b/.github/workflows/scheduled-playwright.yml new file mode 100644 index 0000000000000..0690ed801f061 --- /dev/null +++ b/.github/workflows/scheduled-playwright.yml @@ -0,0 +1,118 @@ +name: 'Scheduled Playwright Tests' + +on: + schedule: + # Run daily at 06:00 UTC + - cron: '0 6 * * *' + workflow_dispatch: + inputs: + shard_count: + description: 'Number of shards to split tests across' + required: false + default: '4' + +jobs: + playwright: + name: 'Playwright (${{ matrix.shard }}/${{ strategy.job-total }})' + runs-on: ubuntu-24.04 + timeout-minutes: 60 + strategy: + fail-fast: false + matrix: + shard: [1, 2, 3, 4] + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Install Node.js 22.x + uses: actions/setup-node@v4 + with: + node-version: 22.x + + - name: Get yarn cache directory path + id: yarn-cache-dir-path + run: echo "dir=$(yarn cache dir)" >> "$GITHUB_OUTPUT" + shell: bash + + - name: Restore yarn cache + uses: actions/cache@v4 + with: + path: ${{ steps.yarn-cache-dir-path.outputs.dir }} + key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} + restore-keys: | + ${{ runner.os }}-yarn- + + - name: Set Yarn version + run: yarn policies set-version v1.22.22 + + - name: Yarn install + uses: nick-fields/retry@v3 + env: + CUBESTORE_SKIP_POST_INSTALL: true + with: + max_attempts: 3 + retry_on: error + retry_wait_seconds: 15 + timeout_minutes: 20 + command: yarn install --frozen-lockfile + + - name: Install Playwright browsers + run: npx playwright install --with-deps + + - name: Build + run: | + yarn build + yarn tsc + + - name: Run Playwright tests (shard ${{ matrix.shard }}/${{ strategy.job-total }}) + run: npx playwright test --shard=${{ matrix.shard }}/${{ strategy.job-total }} + + - name: Upload blob report + if: always() + uses: actions/upload-artifact@v4 + with: + name: blob-report-${{ matrix.shard }} + path: blob-report/ + retention-days: 1 + + merge-reports: + name: 'Merge Playwright Reports' + if: always() + needs: [playwright] + runs-on: ubuntu-24.04 + timeout-minutes: 10 + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Install Node.js 22.x + uses: actions/setup-node@v4 + with: + node-version: 22.x + + - name: Download blob reports + uses: actions/download-artifact@v4 + with: + pattern: blob-report-* + path: all-blob-reports + merge-multiple: true + + - name: Merge reports + run: npx playwright merge-reports --reporter html ./all-blob-reports + + - name: Upload merged HTML report + uses: actions/upload-artifact@v4 + with: + name: playwright-report + path: playwright-report/ + retention-days: 14 + + - name: Slack Failure + if: failure() + uses: voxmedia/github-action-slack-notify-build@v1 + with: + channel: oss-ci + status: FAILED + color: danger + env: + SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }} From de29cd282efccb5e3429986d17d3e7948c0e039c Mon Sep 17 00:00:00 2001 From: Cursor Agent Date: Thu, 30 Apr 2026 22:08:36 +0000 Subject: [PATCH 2/3] feat: use 8 shards on 8-core runners with max-parallel 4 Co-authored-by: Pavel Tiunov --- .github/workflows/scheduled-playwright.yml | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/.github/workflows/scheduled-playwright.yml b/.github/workflows/scheduled-playwright.yml index 0690ed801f061..1aec74b33a6a0 100644 --- a/.github/workflows/scheduled-playwright.yml +++ b/.github/workflows/scheduled-playwright.yml @@ -9,17 +9,22 @@ on: shard_count: description: 'Number of shards to split tests across' required: false - default: '4' + default: '8' + +concurrency: + group: scheduled-playwright + cancel-in-progress: false jobs: playwright: - name: 'Playwright (${{ matrix.shard }}/${{ strategy.job-total }})' - runs-on: ubuntu-24.04 + name: 'Playwright (${{ matrix.shard }}/8)' + runs-on: ubuntu-24.04-8core timeout-minutes: 60 strategy: fail-fast: false + max-parallel: 4 matrix: - shard: [1, 2, 3, 4] + shard: [1, 2, 3, 4, 5, 6, 7, 8] steps: - name: Checkout uses: actions/checkout@v4 @@ -64,8 +69,8 @@ jobs: yarn build yarn tsc - - name: Run Playwright tests (shard ${{ matrix.shard }}/${{ strategy.job-total }}) - run: npx playwright test --shard=${{ matrix.shard }}/${{ strategy.job-total }} + - name: Run Playwright tests (shard ${{ matrix.shard }}/8) + run: npx playwright test --shard=${{ matrix.shard }}/8 - name: Upload blob report if: always() From 25f32367663a6647e207c795c7d97e74b31331c9 Mon Sep 17 00:00:00 2001 From: Cursor Agent Date: Thu, 30 Apr 2026 22:13:21 +0000 Subject: [PATCH 3/3] fix: use valid runner label, add --reporter=blob, fix Slack condition Co-authored-by: Pavel Tiunov --- .github/workflows/scheduled-playwright.yml | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/.github/workflows/scheduled-playwright.yml b/.github/workflows/scheduled-playwright.yml index 1aec74b33a6a0..3142327888e1c 100644 --- a/.github/workflows/scheduled-playwright.yml +++ b/.github/workflows/scheduled-playwright.yml @@ -5,11 +5,9 @@ on: # Run daily at 06:00 UTC - cron: '0 6 * * *' workflow_dispatch: - inputs: - shard_count: - description: 'Number of shards to split tests across' - required: false - default: '8' + +permissions: + contents: read concurrency: group: scheduled-playwright @@ -18,7 +16,7 @@ concurrency: jobs: playwright: name: 'Playwright (${{ matrix.shard }}/8)' - runs-on: ubuntu-24.04-8core + runs-on: ubuntu-latest-8-cores timeout-minutes: 60 strategy: fail-fast: false @@ -70,7 +68,7 @@ jobs: yarn tsc - name: Run Playwright tests (shard ${{ matrix.shard }}/8) - run: npx playwright test --shard=${{ matrix.shard }}/8 + run: npx playwright test --shard=${{ matrix.shard }}/8 --reporter=blob - name: Upload blob report if: always() @@ -113,7 +111,7 @@ jobs: retention-days: 14 - name: Slack Failure - if: failure() + if: ${{ always() && needs.playwright.result == 'failure' }} uses: voxmedia/github-action-slack-notify-build@v1 with: channel: oss-ci