Manuals / CI/CD Pipelines / Chapter 5

B · Security & Config · intermediate · Week 3 · Chapter 5 of 12

Artifacts, reports & debugging CI

When CI fails, artifacts (test reports, screenshots, traces) tell the story. Upload on failure; retention policies matter.

Path progress
35%

Step 1 of 4

Upload test report

actions/upload-artifact@v4 with if: failure() — HTML report, screenshots, logs.

Upload test reportDrag stickies · tap for tips
Study mapDrag stickies · tap for tipsKeep it shortdrag · tap →Name the waitdrag · tap →Scope locatorsdrag · tap →Trace when stuckdrag · tap →One browser firstdrag · tap →Isolate statedrag · tap →Assert the UIdrag · tap →Retry wiselydrag · tap →Seed datadrag · tap →Close the loopdrag · tap →Keep it shortdrag · tap →Name the waitdrag · tap →Scope locatorsdrag · tap →Trace when stuckdrag · tap →One browser firstdrag · tap →Isolate statedrag · tap →Pathwise hackdrag · tap →Upload test reportdrag · tap →Try thisdrag · tap →Follow the dashed drag · tap →

Example

- uses: actions/upload-artifact@v4
  if: failure()
  with:
    name: test-report
    path: reports/
    retention-days: 14

Do this now

Configure artifact upload on test failure. Download from Actions UI.

Was this step clear?
Chapter learning outcomes
  • upload-artifact
  • Download artifacts
  • Retention days
  • Re-running jobs

Clear these before you leave

Side quest

Failure postmortem

Template in CI.md: incident, root cause, fix, prevention.