World map

 

BM: Baca dalam Bahasa Melayu

World 7: Robots: Actions & CI/CD

Matrix, cache, artifacts

You will learn: how to test many setups at once, save time, and keep files from a run.

The problem

Your site must work on Node 22 and Node 24. Copy the whole test job twice? Then fix every bug twice? What’s the best plan?

Pick one answer.

Watch

Tap the line that lists the versions.

0 of 1 found

A matrix: One job recipe that runs once for each item in a list. is one job recipe plus a list. GitHub runs one copy per item. ${{ matrix.node }} is that copy’s item.

Predict

You add a second list, os:, with Linux and Windows. How many jobs run?

Pick one answer.

Watch

Tap each point on the timeline.

A cache: Saved downloads that make the next run faster. is a pantry. The first run shops and stores. Later runs grab from the shelf. cache: npm in setup-node turns it on.

Watch

Tap the line that says which folder to save.

0 of 1 found

An artifact: Files a workflow run saves, so you can download them later. is a takeaway box. A job packs files into it. After the run, you can download them. By default, GitHub keeps them 90 days.

Try it

Pantry or takeaway box? Sort each one.

Drag a card into a box. Or tap the card, then tap the box.

      You did it!

      You can now run a matrix, cache downloads and save artifacts.

      Go deeper (optional)

      When one matrix job fails, GitHub cancels the others. Set fail-fast: false to see every result. For other folders, actions/cache@v6 takes a path and a key. GitHub removes cache entries nobody used for 7 days.