Improve HTML test report (#2282)

This commit is contained in:
Michael Telatynski
2025-04-23 14:33:20 +01:00
committed by GitHub
parent a70c5e0215
commit eef66d9795
6 changed files with 84 additions and 5 deletions
+15 -3
View File
@@ -18,6 +18,10 @@ on:
type: string
required: false
description: "Command to run to prepare the executable or environment for testing"
blob_report:
type: boolean
default: false
description: "Whether to upload a blob report instead of the HTML report"
permissions: {}
jobs:
test:
@@ -65,14 +69,22 @@ jobs:
uses: coactions/setup-xvfb@6b00cf1889f4e1d5a48635647013c0508128ee1a
timeout-minutes: 5
with:
run: "yarn test ${{ runner.os != 'Linux' && '--ignore-snapshots' || '' }}"
run: yarn test --project=${{ inputs.artifact }} ${{ runner.os != 'Linux' && '--ignore-snapshots' || '' }} ${{ inputs.blob_report == false && '--reporter=html' || '' }}
env:
ELEMENT_DESKTOP_EXECUTABLE: ${{ steps.executable.outputs.path }}
- name: Upload blob report
if: always() && inputs.blob_report
uses: actions/upload-artifact@v4
with:
name: blob-report-${{ inputs.artifact }}
path: blob-report
retention-days: 1
- name: Upload HTML report
if: always()
if: always() && inputs.blob_report == false
uses: actions/upload-artifact@v4
with:
name: ${{ inputs.artifact }}-test
path: playwright/html-report
path: playwright-report
retention-days: 14