Playwright is a framework for Web Testing and Automation. It allows testing Chromium, Firefox and WebKit with a single API.
TypeScript automationchromechromiume2e-testingelectronend-to-end-testingfirefoxjavascriptplaywrighttesttest-automationtestingtesting-toolswebwebkit
devops(bidi): fix publishing when a single csv report is uploaded (#42764)
Yury Semikhatskycd80f507bb9c
diff --git a/.github/workflows/tests_bidi.yml b/.github/workflows/tests_bidi.ymlindex 1e68db76ef..17613d26a3 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 GitHubif: ${{ !cancelled() }}uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1with:name: csv-report-${{ matrix.channel }}- path: test-results/report.csv+ path: ${{ runner.temp }}/${{ matrix.channel }}.csvretention-days: 7- name: Upload parquet report@@ -90,21 +96,19 @@ jobs:uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1with:pattern: csv-report-*+ merge-multiple: truepath: csv-reports- name: Publish the reports to the bidi-reports branchrun: |git init -q "$RUNNER_TEMP/reports"cd "$RUNNER_TEMP/reports"git remote add origin "https://x-access-token:[email protected]/$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_HEADchannels=()- 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")donegit add -A