From b624e81a14289af0859b857264797ba75672526e Mon Sep 17 00:00:00 2001 From: Yury Semikhatsky Date: Thu, 24 Sep 2026 12:29:29 -0700 Subject: [PATCH 1/2] devops(bidi): stop publishing csv reports to the bidi-reports branch The BiDi dashboard is populated from the GitHub artifacts, so the branch is unused. --- .github/workflows/tests_bidi.yml | 53 +------------------------------- 1 file changed, 1 insertion(+), 52 deletions(-) diff --git a/.github/workflows/tests_bidi.yml b/.github/workflows/tests_bidi.yml index 9a951207b548e..05f73ee2abe44 100644 --- a/.github/workflows/tests_bidi.yml +++ b/.github/workflows/tests_bidi.yml @@ -60,18 +60,12 @@ jobs: run: xvfb-run --auto-servernum --server-args="-screen 0 1280x960x24" -- npm run biditest -- --retries=${{ matrix.isPullRequest && 2 || 0 }} --project=${{ matrix.channel }}* env: PWTEST_USE_BIDI_EXPECTATIONS: ${{ matrix.isPullRequest && '1' || '' }} - # Name the report after the channel so that the publish job can merge all of - # them into one directory without collisions. - - name: Name the csv report after the channel - if: ${{ !cancelled() && hashFiles('test-results/report.csv') != '' }} - run: cp test-results/report.csv "$RUNNER_TEMP/${{ matrix.channel }}.csv" - - name: Upload csv report to GitHub if: ${{ !cancelled() }} uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 with: name: csv-report-${{ matrix.channel }} - path: ${{ runner.temp }}/${{ matrix.channel }}.csv + path: test-results/report.csv retention-days: 7 - name: Upload json report to GitHub @@ -91,48 +85,3 @@ jobs: - name: Add report to the job summary if: ${{ !cancelled() && hashFiles('test-results/report.md') != '' }} run: cat test-results/report.md >> "$GITHUB_STEP_SUMMARY" - - publish_reports: - name: Publish reports - needs: test_bidi - if: ${{ !cancelled() && github.ref == 'refs/heads/main' && github.repository == 'microsoft/playwright' }} - runs-on: ubuntu-24.04 - permissions: - contents: write # This is required to push to the bidi-reports branch - steps: - - name: Download csv reports - uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 - with: - pattern: csv-report-* - merge-multiple: true - path: csv-reports - - name: Publish the reports to the bidi-reports branch - run: | - git init -q "$RUNNER_TEMP/reports" - cd "$RUNNER_TEMP/reports" - git remote add origin "https://x-access-token:$GITHUB_TOKEN@github.com/$GITHUB_REPOSITORY.git" - git fetch --depth=1 origin bidi-reports - git reset --hard FETCH_HEAD - channels=() - for file in "$GITHUB_WORKSPACE"/csv-reports/*.csv; do - channel=$(basename "$file" .csv) - cp "$file" "$channel.csv" - channels+=("$channel") - done - git add -A - if git diff --cached --quiet; then - echo "No changes since the last run." - exit 0 - fi - git commit -q -m "bidi: results for ${GITHUB_SHA:0:9}" - git push origin HEAD:bidi-reports - for channel in "${channels[@]}"; do - echo "Report url: https://github.com/$GITHUB_REPOSITORY/blob/bidi-reports/$channel.csv" - echo "Raw report url: https://raw.githubusercontent.com/$GITHUB_REPOSITORY/bidi-reports/$channel.csv" - done - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - GIT_AUTHOR_NAME: microsoft-playwright-automation[bot] - GIT_AUTHOR_EMAIL: 203992400+microsoft-playwright-automation[bot]@users.noreply.github.com - GIT_COMMITTER_NAME: microsoft-playwright-automation[bot] - GIT_COMMITTER_EMAIL: 203992400+microsoft-playwright-automation[bot]@users.noreply.github.com From 18e07f28aadaab686e32c450d15321b2e64bd194 Mon Sep 17 00:00:00 2001 From: Yury Semikhatsky Date: Thu, 24 Sep 2026 12:30:23 -0700 Subject: [PATCH 2/2] devops(bidi): drop the markdown report from the job summary --- .github/workflows/tests_bidi.yml | 4 ---- tests/bidi/csvReporter.ts | 26 -------------------------- tests/bidi/playwright.config.ts | 2 +- 3 files changed, 1 insertion(+), 31 deletions(-) diff --git a/.github/workflows/tests_bidi.yml b/.github/workflows/tests_bidi.yml index 05f73ee2abe44..2fd41165825d4 100644 --- a/.github/workflows/tests_bidi.yml +++ b/.github/workflows/tests_bidi.yml @@ -81,7 +81,3 @@ jobs: uses: ./.github/actions/upload-parquet-report with: job_name: ${{ matrix.channel }} - - - name: Add report to the job summary - if: ${{ !cancelled() && hashFiles('test-results/report.md') != '' }} - run: cat test-results/report.md >> "$GITHUB_STEP_SUMMARY" diff --git a/tests/bidi/csvReporter.ts b/tests/bidi/csvReporter.ts index d5ef17cdf0131..2a061a12b8350 100644 --- a/tests/bidi/csvReporter.ts +++ b/tests/bidi/csvReporter.ts @@ -24,7 +24,6 @@ import path from 'path'; type ReporterOptions = { outputFile?: string, - markdownFile?: string, configDir: string, }; @@ -77,15 +76,10 @@ class CsvReporter implements Reporter { } } const reportFile = path.resolve(this._options.configDir, this._options.outputFile || 'test-results.csv'); - const markdownFile = this._options.markdownFile && path.resolve(this._options.configDir, this._options.markdownFile); this._pendingWrite = (async () => { await fs.promises.mkdir(path.dirname(reportFile), { recursive: true }); const csv = [header, ...rows].map(r => r.map(csvEscape).join(',')).join('\n'); await fs.promises.writeFile(reportFile, csv); - if (markdownFile) { - await fs.promises.mkdir(path.dirname(markdownFile), { recursive: true }); - await fs.promises.writeFile(markdownFile, markdownTable(rows)); - } })(); } @@ -104,24 +98,4 @@ function csvEscape(str) { return str; } -// GitHub job summaries are capped at 1MiB, so keep the rendered table bounded. -const maxMarkdownRows = 500; - -function markdownTable(rows: string[][]): string { - const lines = [ - `### ${rows.length} failing tests`, - '', - `| ${header.join(' | ')} |`, - `| ${header.map(() => '---').join(' | ')} |`, - ...rows.slice(0, maxMarkdownRows).map(row => `| ${row.map(markdownEscape).join(' | ')} |`), - ]; - if (rows.length > maxMarkdownRows) - lines.push('', `_...and ${rows.length - maxMarkdownRows} more, see the csv report._`); - return lines.join('\n') + '\n'; -} - -function markdownEscape(str: string): string { - return str.replace(/[\\|`<>]/g, c => '\\' + c); -} - export default CsvReporter; diff --git a/tests/bidi/playwright.config.ts b/tests/bidi/playwright.config.ts index 438bbd2c6ad87..3dfe1d6786071 100644 --- a/tests/bidi/playwright.config.ts +++ b/tests/bidi/playwright.config.ts @@ -47,7 +47,7 @@ const reporters = () => { ['json', { outputFile: path.join(outputDir, 'report.json') }], ['blob'], ['../config/parquetReporter.ts'], - ['./csvReporter', { outputFile: path.join(outputDir, 'report.csv'), markdownFile: path.join(outputDir, 'report.md') }], + ['./csvReporter', { outputFile: path.join(outputDir, 'report.csv') }], ['./expectationReporter', { rebase: false }], ] : [ ['html', { open: 'on-failure' }],