Manuals / Test Automation / Chapter 10

D · Delivery · intermediate · Week 6 · Chapter 10 of 12

CI, artifacts, and ownership

Tests that only run on your laptop are hobbies. Wire CI, fail loud with traces/videos, and assign owners to red builds.

Path progress
77%

Step 1 of 4

Run on every PR

GitHub Actions on pull_request. Keep smoke fast (<10 min) so people do not skip.

Run on every PRDrag 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 →Run on every PRdrag · tap →Try thisdrag · tap →Follow the dashed drag · tap →

Example

name: UI Tests
on: [pull_request, push]
jobs:
  test:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: actions/setup-node@v4
      - run: npm ci && npx playwright install --with-deps
      - run: npx playwright test
      - uses: actions/upload-artifact@v4
        if: failure()
        with:
          name: test-results
          path: test-results/

Do this now

Add a workflow that runs your suite and uploads artifacts on failure.

Was this step clear?
Chapter learning outcomes
  • PR checks
  • Artifacts in CI
  • Flake budgets

Clear these before you leave

Side quest

Actions pipeline

Ship workflow + README section “How to debug CI fails.” Screenshot green run in docs/ci-green.png.