From 54fc88517f05721f53d211103a5ab6e4342757fc Mon Sep 17 00:00:00 2001 From: Yury Semikhatsky Date: Thu, 17 Sep 2026 15:22:08 -0700 Subject: [PATCH] devops(bidi): fix publishing when a single csv report is uploaded actions/download-artifact only creates per-artifact subdirectories when more than one artifact matches the pattern, so with only the firefox report present the glob matched nothing and the step failed. Name each report after its channel at upload time and merge them into one flat directory, which does not depend on the artifact count. Also drop the branch seeding, the bidi-reports branch is created manually. --- .github/workflows/tests_bidi.yml | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/.github/workflows/tests_bidi.yml b/.github/workflows/tests_bidi.yml index 1e68db76efad9..17613d26a3775 100644 --- a/.github/workflows/tests_bidi.yml +++ b/.github/workflows/tests_bidi.yml @@ -60,12 +60,18 @@ 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: test-results/report.csv + path: ${{ runner.temp }}/${{ matrix.channel }}.csv retention-days: 7 - name: Upload parquet report @@ -90,21 +96,19 @@ jobs: 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" - # Continue the branch history, or start it on the very first run. An - # initial commit with no fetched parent is what makes the branch orphan. - git fetch --depth=1 origin bidi-reports && git reset --hard FETCH_HEAD || true - echo 'Nightly BiDi test reports, published by .github/workflows/tests_bidi.yml.' > README.md + git fetch --depth=1 origin bidi-reports + git reset --hard FETCH_HEAD channels=() - for dir in "$GITHUB_WORKSPACE"/csv-reports/csv-report-*/; do - channel=${dir%/} - channel=${channel##*/csv-report-} - cp "$dir/report.csv" "$channel.csv" + for file in "$GITHUB_WORKSPACE"/csv-reports/*.csv; do + channel=$(basename "$file" .csv) + cp "$file" "$channel.csv" channels+=("$channel") done git add -A