Checkout, toolchain & lockfiles
Prepare a repeatable runner
Lesson 3 of 20 · 12 min · Module 1: Feedback and workflow structure
A new runner needs source, a runtime, and dependencies before application checks.
Start this lesson →Free. No installation: you write and run the code in your browser, and it is checked automatically.
By the end, you’ll be able to…
- Start from the repository contents
- State the toolchain
The idea
A workflow combines an event boundary, job dependencies, and ordered steps. Conditions and prerequisite outcomes determine which jobs can run.
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with: {node-version: "22"}
- run: npm ci
01Start from the repository contents
actions/checkout retrieves the source associated with the run. A fresh runner does not automatically contain your project files.
02State the toolchain
setup-node chooses the Node version explicitly. Dependencies should be installed from a committed lockfile with npm ci.
03Check the sequence
The preparation steps must precede application commands. The practice model records the sequence; actual dependency execution happens on real Actions runners.
Your turn
What the checks look for
- Checks out source and selects Node 22
- Installs before testing
Take this with you
Make a fresh runner able to reproduce the preparation sequence.
Go a little further
Explain what happens when package.json and its lockfile disagree.