Skip to content

Commit e9cdfb5

Browse files
author
Janne Rönkkö
committed
Add E2E test reports to workflow run status page
1 parent 0db2179 commit e9cdfb5

1 file changed

Lines changed: 39 additions & 0 deletions

File tree

.github/workflows/shared-run-e2e.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -180,6 +180,22 @@ jobs:
180180
-e SPLIT_INDEX="${{ strategy.job-index }}" \
181181
cypress /e2e/cypress/run_cypress_in_4K_xvfb.sh
182182
183+
- name: Copy test results
184+
id: copy_test_results
185+
# Should be run especially when tests fail
186+
if: always()
187+
shell: bash
188+
run: |
189+
docker cp cypress:/e2e/cypress/ctrf-report.json ${{ github.workspace }}/ctrf-report.json
190+
191+
- name: Upload test reports as an artifact
192+
# Should be run especially when tests fail
193+
if: always()
194+
uses: actions/upload-artifact@v4
195+
with:
196+
name: cypress-test-results-${{ strategy.job-index }}
197+
path: ${{ github.workspace }}/ctrf-report.json
198+
183199
- name: Copy test reports from Cypress container
184200
id: copy_test_reports
185201
# Should be run especially when tests fail
@@ -205,3 +221,26 @@ jobs:
205221
with:
206222
name: cypress-docker-reports-${{ strategy.job-index }}
207223
path: ${{ github.workspace }}/test-reports
224+
225+
publish_e2e_test_results:
226+
name: Publish E2E Test Results
227+
runs-on: ubuntu-24.04
228+
needs:
229+
- run_e2e_tests
230+
steps:
231+
- name: Download E2E Test Results
232+
uses: actions/download-artifact@v4
233+
continue-on-error: true
234+
with:
235+
pattern: cypress-test-results-*
236+
path: ${{ github.workspace }}/ctrf
237+
238+
- name: Publish Test Report
239+
uses: ctrf-io/github-test-reporter@27b97adba93f02142c573c8a710045cac0d874ae # v1.0.14
240+
with:
241+
report-path: 'ctrf/*/*.json'
242+
summary-report: true
243+
failed-report: true
244+
flaky-report: true
245+
skipped-report: true
246+
test-report: true

0 commit comments

Comments
 (0)