@@ -135,23 +135,33 @@ jobs:
135135 PR_TITLE : ${{ github.event.pull_request.title }}
136136 PR_URL : ${{ github.event.pull_request.html_url }}
137137
138- - name : Comment PR with test results (success)
138+ - name : Generate test report summary (success)
139+ id : report-summary-success
139140 if : success() && github.event_name == 'pull_request'
140141 uses : daun/playwright-report-summary@v3
141142 with :
142143 report-file : frontend/e2e/playwright-report/results.json
143144 comment-title : ' Playwright Test Results (${{ steps.test-type.outputs.label }} - ${{ inputs.runs-on }})'
144- report-tag : ' playwright-${{ steps.test-type.outputs.label }}-${{ inputs.runs-on }} '
145+ create-comment : false
145146 custom-info : |
146147 **🔄 Run:** [#${{ github.run_number }} (attempt ${{ github.run_attempt }})](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }})
147148
148- - name : Comment PR with test results (failure)
149+ - name : Generate test report summary (failure)
150+ id : report-summary-failure
149151 if : failure() && github.event_name == 'pull_request'
150152 uses : daun/playwright-report-summary@v3
151153 with :
152154 report-file : frontend/e2e/playwright-report/results.json
153155 comment-title : ' Playwright Test Results (${{ steps.test-type.outputs.label }} - ${{ inputs.runs-on }})'
154- report-tag : ' playwright-${{ steps.test-type.outputs.label }}-${{ inputs.runs-on }} '
156+ create-comment : false
155157 custom-info : |
156158 **📦 Artifacts:** [View test results and HTML report](${{ steps.artifact-url.outputs.url }})
157159 **🔄 Run:** [#${{ github.run_number }} (attempt ${{ github.run_attempt }})](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }})
160+
161+ - name : Comment PR with test results
162+ if : always() && github.event_name == 'pull_request' && (steps.report-summary-success.outputs.summary || steps.report-summary-failure.outputs.summary)
163+ uses : marocchino/sticky-pull-request-comment@v2
164+ with :
165+ header : playwright-e2e-results
166+ append : true
167+ message : ${{ steps.report-summary-success.outputs.summary || steps.report-summary-failure.outputs.summary }}
0 commit comments