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.
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.
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.
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.
Bahasa Melayu
Anda push. Pipeline jalan selama 40 minit. Kemudian ia gagal kerana salah taip. 40 minit hilang begitu sahaja! Macam mana nak tahu lebih awal?
Ada salah taip dalam kod.
Semakan cepat pergi dulu, jadi berita buruk sampai cepat. Itulah maklum balas pantas (fast feedback).
Susun semakan ini. Yang paling cepat di atas.
Run dua kali. Run kedua langkau muat turun yang lambat. Cache buat setiap run lebih laju.
Hidangan sama, tiga kali rasa, dua jawapan. Ujian begini dipanggil flaky test (ujian tak tetap).
Ujian anda flaky. Cara baiki yang baik, atau perlu dibaiki? Leret setiap satu.
Pasukan anda tekan re-run pada setiap run merah. Apa jadi lepas ni?
Kini anda boleh dapat maklum balas pantas dan uruskan ujian flaky.
You finished this before. Practice is always welcome!
Official docs: Dependency caching · Re-running workflows and jobs
You've learned for 25 minutes. A short break helps your brain.
Sprint done! Great focus. Stretch for a minute?