INFRASTRUCTURE LEARNINGINFRASTRUCTURE LEARNING
インフラ大全インフラ大全IT INFRASTRUCTURE / LEARNING
Infrastructure learning guide
Find a lesson or lab/

Esc to close · Search terms stay on your device

LEARNING日本語

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.

What you will learn

Connect a change, tested revision, expected outcomes and executed checks; distinguish a passing test from evidence about production.

Prerequisite

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

Separate the change, check and decision
CHANGE
Share a change

Record the revision and changed rule.

CHECK
Defined checks

Compare inputs with expected outcomes and retain results.

REVIEW
Interpret results

Check for missing runs, wrong targets and uncovered conditions.

INTEGRATE
Decide integration

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.

Proposed version B: short, but incomplete
// 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.
Fixed C1 inputs and expectations
InputExpectedActual in BTest outcome
443 (number)AcceptAcceptMatch
0 (number)RejectRejectMatch
"443" (text)RejectAcceptMismatch
65535 (number)AcceptAcceptMatch
65536 (number)RejectAcceptMismatch
443.5 (number)RejectAcceptMismatch

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

Corrected C: check type, integrality and bounds
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

Evidence to inspect
FieldWhat to establish in C1
Tested revisionB or C? A result for old A does not validate C.
Executed inputsOnly 443 and 0, or all six?
Expected versus actualAre mismatches reported as failures?
Execution stateExecuted, skipped, cancelled or never started?
Environment and scopeRecord 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.

  1. State the changed rule as inputs and expected outcomes.
  2. Include types, boundaries and invalid values, not only normal cases.
  3. Run against the current revision and report mismatches as failures.
  4. Do not count missing execution or a different target as a pass.
  5. Connect review, artifacts, destination and operational checks in a pipeline.

Interpret CI results

Choose an option to see the result and explanation.

B passes the two cases 443 and 0. What does this establish?
Read the answer and reason

Answer: Actual and expected behavior matched for those two inputs. · Read the result within the tested inputs and revision.

Under the C1 contract, what is expected for text "443"?
Read the answer and reason

Answer: Reject; it is not a numeric integer. · C1 explicitly excludes automatic conversion.

A condition skips a job and its check is treated as successful. Did its tests run?
Read the answer and reason

Answer: The conclusion alone does not establish execution. · Inspect the target, condition and test evidence.

C is added after A passed. What is needed before integration?
Read the answer and reason

Answer: Verify required checks for C and the relevant integration target. · Tie the current change to the revision actually checked.

Check, then explain in your own words

  1. Restate the C1 input contract.
  2. Explain B’s three mismatches among six cases.
  3. Identify revision, execution conditions, expected and actual behavior.
  4. 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.