Workflow foundations
Run reproducible steps
Make workflow commands match documented local commands and pin the runtime they require.
9 minute lesson
The workflow uses the repository’s install, test, and build scripts on a declared Node version. That contrast gives us something useful to test instead of a rule to memorize.
CI should reveal environmental assumptions, not introduce a second private build procedure. The useful target is not encyclopedic coverage. Make one deliberate choice, observe its consequences, and know which requirement would make you revise it.
The happy path can hide a bad design: you can hide critical logic in long inline shell blocks that no one runs locally and still get one successful demo. Push past the demo. put reusable build logic in versioned project scripts and let YAML orchestrate those commands, then test the condition most likely to prove the choice wrong.
The module is moving toward one outcome: Create one workflow whose trigger, runner, permissions, commands, and failure behavior are obvious. Save the before-and-after evidence now; it will make the final project review much more honest.
Start from a clean local checkout and reproduce every workflow command in order. Save the evidence, then explain which requirement would force you to choose a different design.
Lesson completed