MODULE 20 · LESSON 20.1
Run deterministic checks with caching, least privilege and useful artifacts.
Where this fits in CourseFlow
The difficult part of GitHub Actions Continuous Integration is deciding where the responsibility belongs and how you will know it works. This lesson controls how a working change survives machines, environments, traffic and failure after it leaves a developer laptop.
Here, that decision supports a specific checkpoint: Create a protected GitHub Actions pipeline for CourseFlow. A reviewable result should include a command transcript, CI result, deployment check and rollback note rather than a claim that the feature simply works.
GitHub Actions Continuous Integration workflow
- 1Workflow Triggers
- 2Jobs
- 3Dependency Caching
- 4Permissions
A practical model for github actions continuous integration
Run deterministic checks with caching, least privilege and useful artifacts. The useful unit of understanding is the boundary: who owns the decision, which input crosses it, what result is visible and how a failure is reported.
- Workflow Triggers: State the assumption this concept relies on and show how the system behaves when it is false.
- Jobs: Connect this concept to the module checkpoint and identify the evidence a reviewer should expect.
- Dependency Caching: Explain the concept without framework jargon, then point to it in the working example.
- Permissions: Decide what belongs in code, configuration, data or documentation and explain why.
Read the result, not just the syntax
Use the sample to answer one question: does the implementation make workflow triggers easier to verify or merely harder to see?
permissions:
contents: read
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: npm ci
- run: npm testChange one input connected to workflow triggers, predict the result, then run the successful path and one failure path.
Build the smallest useful version
- 1Workflow Triggers
Add a regression check close to the boundary where this behavior can fail.
- 2Jobs
Describe the behavior in one sentence, then choose the smallest input that can prove it.
- 3Dependency Caching
Add this responsibility at the narrowest sensible boundary; do not pull an unrelated layer into the change.
- 4Permissions
Run the focused example and save the output, trace, query or screenshot that confirms the result.
Failure patterns to recognize
- Treating workflow triggers as vocabulary instead of defining the behavior it must produce.
- Testing the expected path while ignoring an empty, invalid, repeated or unauthorized case around jobs.
- Allowing dependency caching to cross a boundary without an explicit contract or useful error.
- Changing several layers before capturing the first piece of evidence, which makes the original cause harder to see.
A debugging route that preserves evidence
- Reduce the problem to the smallest failing GitHub Actions Continuous Integration case.
- Capture the actual input and output at the workflow triggers boundary.
- Read the first relevant error, request, trace or query rather than the loudest downstream symptom.
- Test one explanation for the failure in jobs; avoid changing two variables together.
- Keep a regression check that would expose the same defect if it returned.
Security decision
Use least privilege, protected secrets, reviewed dependencies and reversible changes. A deployment shortcut must never weaken the application boundary.
Performance decision
Establish a baseline, observe resource use and latency, and keep a rollback signal. Capacity changes without measurement are guesses.
PRACTICE
Build something you can inspect
Build a workflow for lint, typecheck, unit tests and production build.
Stretch challenge
Replace one happy-path assumption about jobs with explicit validation and show the before-and-after behavior.
Definition of done
- The behavior around workflow triggers works with realistic input.
- A failure involving jobs is handled clearly and without leaking sensitive detail.
- The implementation remains keyboard-usable when it produces an interface.
- Your evidence directly supports the claim made in the exercise.
- The README records the important trade-off without pretending the solution is universal.
Check your reasoning
Why should workflow permissions be explicitly minimized?
Answer by naming the expected workflow triggers behavior, the layer responsible for it and the evidence that would confirm your explanation.
Where would you investigate the first failure?
Start where jobs crosses a boundary. Compare the actual input and output there before following downstream symptoms.
What would make this work reviewable?
Show the focused change, repeatable steps, the result of your check and one honest trade-off connected to dependency caching.
What to carry into the next lesson
- Run deterministic checks with caching, least privilege and useful artifacts.
- Keep workflow triggers visible at the boundary where it can be tested.
- Use evidence from jobs before widening the implementation.
References and related reading
Progress is stored only in this browser.
Share this page
Share this page with the people who will use it next.
Discussion
No comments yet. Add the first useful question or observation.
You must log in to post a comment.