Skip to content

Commit

Permalink
Split reporting and add ISO date (#5396)
Browse files Browse the repository at this point in the history
* add date as extra attribute to summary

* add changeset

* overwrite comment
  • Loading branch information
szczecha authored and witoszekdev committed Feb 18, 2025
1 parent f3e75bc commit eb76fa3
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 3 deletions.
5 changes: 5 additions & 0 deletions .changeset/four-islands-punch.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"saleor-dashboard": patch
---

Publish only the table with the summary on PRs, now includes a quick link to the job summary. Added ISO formatted date to the report for future flakiness measurement.
20 changes: 17 additions & 3 deletions .github/actions/flaky-tests-report/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,17 @@ runs:
pattern: ctrf-report-*
path: ctrf-reports
merge-multiple: true

- name: Merge CTRF reports
shell: bash
run: npx ctrf merge ./ctrf-reports --output merged-report.json

- name: Add execution date to merged report
shell: bash
run: |
DATE=$(date -u +"%Y-%m-%dT%H:%M:%SZ") # ISO format
jq --arg date "$DATE" '.results.summary.extra = { "data": $date }' ctrf-reports/merged-report.json > ctrf-reports/tmp.json && mv ctrf-reports/tmp.json ctrf-reports/merged-report.json
- name: Upload CTRF report
uses: actions/upload-artifact@v4
with:
Expand All @@ -34,9 +40,17 @@ runs:
with:
report-path: ctrf-reports/merged-report.json
summary-report: true
pull-request: true
commit-report: true
env:
GITHUB_TOKEN: ${{ inputs.github_token }}
if: always()

- name: Publish PR Comment
uses: ctrf-io/github-test-reporter@v1
with:
report-path: ctrf-reports/merged-report.json
pull-request-report: true
overwrite-comment: true
failed-report: true
env:
GITHUB_TOKEN: ${{ inputs.github_token }}
if: always()
Expand Down

0 comments on commit eb76fa3

Please sign in to comment.