World map

 

BM: Baca dalam Bahasa Melayu

World C1: Pipeline Thinking

Fast feedback and flaky tests

You will learn: how to hear bad news fast, and what to do with a test that can't make up its mind.

Checked with GitHub Actions 2026-10 on 31 Oct 2026

The problem

You push. The pipeline runs for 40 minutes. Then it fails on a typo. 40 minutes, gone! How could you know sooner?

Pick one answer.

Predict

A typo slipped into the code.

Which station will stop the line? Tap it, then press Run.

What happened on GitHub

Workflow file .github/workflows/ci.yml

name: CI
on:
push:
branches: [main]
pull_request:
permissions:
contents: read
jobs:
ci:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- uses: actions/setup-node@v7
with:
node-version: 24
cache: npm
- run: npm ci
- run: npm run lint
- run: npm test
- run: npm run build

The line

Pull request · feature → main

Quick checks go first, so bad news comes fast. That is fast feedback: Hearing about a problem in seconds or minutes, while the change is still fresh in your head..

Try it

Order these checks. Put the fastest at the top.

Fastest at the top. Put these in order. Use the arrows, or drag.

  • Lint (10 seconds)
  • Unit tests (1 minute)
  • End-to-end tests (12 minutes)
  • Build (3 minutes)

Watch

Run it twice. Watch the second run take a shortcut.

What happened on GitHub

Workflow file .github/workflows/ci.yml

name: CI
on:
push:
branches: [main]
pull_request:
permissions:
contents: read
jobs:
ci:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- uses: actions/setup-node@v7
with:
node-version: 24
cache: npm
- run: npm ci
- run: npm run lint
- run: npm test
- run: npm run build

The line

Push to main · main

Run it twice. The second run skips the slow download. A cache makes every run faster.

Watch

Tap each point on the timeline.

Same dish, three tastings, two answers. A test that does this is a flaky test: A test that passes and fails on the same code, like a taster who keeps changing their mind..

Try it

Your test is flaky. Good fix, or needs work? Swipe each one.

Swipe right for good, left for needs work. Or use the buttons.

1 / 5

Press re-run until it turns green

Press re-run until it turns green

Check

Your team presses re-run on every red run. What happens next?

Pick one answer.

You did it!

You can now get fast feedback and handle flaky tests.

Go deeper (optional)

Many teams aim for CI feedback in about ten minutes. To go faster: caches, jobs side by side, and path filters (World C2). GitHub can re-run only the failed jobs. Handy, but still fix the flake.

Real rep (optional): open your repo’s last ten runs. Did one commit go red, then green, with no change? You found a flaky test.