Topic lessonTopic: CI/CD design: from checks to release and recovery
What is CI? Automated checks and what passing tests cannot prove
Continuous integration (CI) combines frequent, small changes with automated builds and checks to expose problems early. Follow a tiny port-validation function to see what a check examined and what its success establishes. No GitHub or AWS account is required.
Connect a change, tested revision, expected outcomes and executed checks; distinguish a passing test from evidence about production.
A Git commit identifies recorded content. A revision is the version read by a check. You need neither a CI service setup nor memorized programming syntax.
CI returns timely feedback on changes
Record the revision and changed rule.
Compare inputs with expected outcomes and retain results.
Check for missing runs, wrong targets and uncovered conditions.
Use requirements, review and required checks.
Conceptual responsibilities, not a live run or an automatic route to production.
CI is a development practice rather than another name for GitHub Actions. Small, frequent integration and repeatable feedback are central. An Actions workflow may check or deploy software; merely having one does not establish an effective CI process.
A build creates a runnable or distributable output from source. A test compares behavior with specified expectations. Configuration and style checks can complement them. Define which changes trigger which checks and which results are required for integration.
Example: is any positive number a valid port?
Fictional check C1 accepts listenPort only if it is a numeric integer from 1 through 65535, inclusive. It does not convert text. This is a chosen input contract, not a connection attempt to a real server.
// Fictional input check, not a server configuration
const validPort = value => Number(value) > 0;
// Number("443") becomes 443; the original type is lost.
// 65536 and 443.5 are also positive.| Input | Expected | Actual in B | Test outcome |
|---|---|---|---|
| 443 (number) | Accept | Accept | Match |
| 0 (number) | Reject | Reject | Match |
| "443" (text) | Reject | Accept | Mismatch |
| 65535 (number) | Accept | Accept | Match |
| 65536 (number) | Reject | Accept | Mismatch |
| 443.5 (number) | Reject | Accept | Mismatch |
With only 443 and 0, B passes both cases. That success says nothing about the untested text, upper-bound or fractional cases. Derive expectations from the input contract, rather than changing them to agree with the implementation.
Fix the rule and keep the expectations
const validPort = value =>
Number.isInteger(value) && value >= 1 && value <= 65535;
// All six C1 inputs now match their specified expectations.C matches all six expectations. Retain cases that exposed B to detect that defect returning. For a failure, inspect revision, input, expected and actual behavior; distinguish an implementation defect, an incorrect expectation and an environment difference.
Read the target and execution behind a green result
| Field | What to establish in C1 |
|---|---|
| Tested revision | B or C? A result for old A does not validate C. |
| Executed inputs | Only 443 and 0, or all six? |
| Expected versus actual | Are mismatches reported as failures? |
| Execution state | Executed, skipped, cancelled or never started? |
| Environment and scope | Record runtime/dependencies; separate live connectivity checks. |
In GitHub checks, a conditionally skipped job can be treated as successful. That conclusion does not establish that its tests ran. Distinguish a skipped job from a workflow that never started, and inspect the target, conditions, logs and test report.
For a PR, the proposed head and integration-test revision can differ. The Actions lesson explains how to identify the version actually read. The important evidence is what was checked, not the CI product name.
Input tests and production connectivity need different evidence
Accepting 443 in C does not demonstrate that a server started, listens on 443, has a reachable route, permits traffic or presents a valid TLS certificate. Validate input form, process state, network path, encryption and user-visible behavior with appropriate evidence.
- State the changed rule as inputs and expected outcomes.
- Include types, boundaries and invalid values, not only normal cases.
- Run against the current revision and report mismatches as failures.
- Do not count missing execution or a different target as a pass.
- Connect review, artifacts, destination and operational checks in a pipeline.
Interpret CI results
Choose an option to see the result and explanation.
Check, then explain in your own words
- Restate the C1 input contract.
- Explain B’s three mismatches among six cases.
- Identify revision, execution conditions, expected and actual behavior.
- Name production properties an input check leaves unverified.
Check your understanding: C passed all six cases. Has production TLS connectivity been verified?
No. C checks numeric type, integrality and range. Identify the deployed output and destination, then separately validate listening, routing, access control, TLS and user behavior.
Use CI correctly by keeping conclusions within the conditions actually tested.
Sources and conditions checked
The official references used in this lesson are collected here with their scope, conditions and corresponding sections. Independent expert review and live AWS comparison have not been performed.
- GitHub: Continuous integrationChecked:
Scope and conditionsFrequent integration and automated feedback; Actions is one implementation, not a definition of all CI. Documentation review, not live GitHub/AWS validation.
Used in this lessonCI returns timely feedback on changes
- GitHub: Status checksChecked:
Scope and conditionsA skipped job is treated as successful; distinguish executed-test evidence and a workflow that never starts. Documentation review, not live GitHub/AWS validation.
Used in this lessonRead the target and execution behind a green result
Scope and conditionsDefault pull_request merge ref versus head.sha for open mergeable PRs; other events and checkout targets differ. Documentation review, not live-environment validation.
Used in this lessonRead the target and execution behind a green result