Skip to content

.tip

· one of the small things

Upload the CI artifact with if: always()

The failing run is the one whose logs, traces and screenshots you want, and it's the run where the upload step never happens. A step after a failed step gets skipped unless its if says otherwise.

- uses: actions/upload-artifact@v4
  if: always()
  with:
    name: playwright-report
    path: playwright-report/
    retention-days: 7
    if-no-files-found: ignore

if: failure() keeps only the red runs. always() fires on a cancelled job too, so a job you killed at the 30 minute mark still leaves you a partial report.

ci