Upload the CI artifact with if: always()
The run that fails is the run whose logs, traces and screenshots you want, and it is the run where the upload step never happens. A step after a failed step is skipped unless its if says so.
- uses: actions/upload-artifact@v4
if: always()
with:
name: playwright-report
path: playwright-report/
retention-days: 7
if-no-files-found: ignoreif: failure() keeps the red runs only. always() fires on a cancelled job too, so a job you killed at the 30 minute mark still leaves you the partial report.
ci