🐛 Make integration test summary non-fatal

The summary step reads a filter from .github/scripts, which is absent
on branches predating it, so a missing file turned otherwise green
runs red. Tolerate both a missing filter and a jq error: a cosmetic
summary should never fail a run.

Use `!cancelled()` instead of `always()` on the merge job. With
`always()` it also ran when the run itself was cancelled by
cancel-in-progress, after the shards had been killed without uploading
their blobs, leaving the download step with nothing to match.

Lower the JSON report retention to 7 days, the repository maximum.
Requesting 30 was silently clamped and logged a warning on every run.

Signed-off-by: David Barragán Merino <david.barragan@kaleidos.net>
This commit is contained in:
David Barragán Merino 2026-09-15 18:26:52 +02:00 committed by David Barragán Merino
parent b9e233f497
commit 38712aa29f

View File

@ -178,7 +178,7 @@ jobs:
retention-days: 3 retention-days: 3
merge-reports: merge-reports:
if: ${{ always() && !github.event.pull_request.draft && needs.test-integration.result != 'skipped' }} if: ${{ !cancelled() && !github.event.pull_request.draft && needs.test-integration.result != 'skipped' }}
name: "Merge Integration Reports" name: "Merge Integration Reports"
runs-on: penpot-extended-runner runs-on: penpot-extended-runner
timeout-minutes: 15 timeout-minutes: 15
@ -221,16 +221,18 @@ jobs:
- name: Test summary - name: Test summary
if: always() if: always()
continue-on-error: true
working-directory: ./frontend working-directory: ./frontend
run: | run: |
if [ ! -f report.json ]; then if [ ! -f report.json ]; then
echo "No report produced (all shards failed early)." >> "$GITHUB_STEP_SUMMARY" echo "No report produced (all shards failed early)." >> "$GITHUB_STEP_SUMMARY"
exit 0 exit 0
fi fi
jq -r -f ../.github/scripts/playwright-summary.jq report.json >> "$GITHUB_STEP_SUMMARY" jq -r -f ../.github/scripts/playwright-summary.jq report.json \
>> "$GITHUB_STEP_SUMMARY" \
|| echo "Summary generation failed; see the HTML report artifact." \
>> "$GITHUB_STEP_SUMMARY"
# Kept for 30 days so flakiness rates can be aggregated across runs
# without scraping job logs.
- name: Upload JSON report - name: Upload JSON report
uses: actions/upload-artifact@v7 uses: actions/upload-artifact@v7
if: always() if: always()
@ -239,7 +241,7 @@ jobs:
path: frontend/report.json path: frontend/report.json
overwrite: true overwrite: true
if-no-files-found: ignore if-no-files-found: ignore
retention-days: 30 retention-days: 7
- name: Upload HTML report - name: Upload HTML report
uses: actions/upload-artifact@v7 uses: actions/upload-artifact@v7