← All Learning Paths

CI Pipeline Engineer

Build CI people trust: hermetic tests, flake quarantine, impact-selected runs, Testcontainers, dependency gates, and cache hits that actually restore.

roleintermediate8 nodes10.92h total

Path overview

流水线的可信度来自确定性:同样的提交必须得到同样的结果。本路径从抖动用例与密封环境讲起,覆盖覆盖率门禁与影响分析,再落地从 pre-commit 到依赖审查的完整配方链,收尾于缓存未命中的排查。

A pipeline is trusted when it is deterministic: same commit, same result. This path covers flaky quarantine, hermetic environments, coverage gates, impact analysis, Testcontainers, and cache misses.

  1. Use "Set Up CI/CD with GitHub Actions" to decide "Directory .github/workflows/ exists (create with mkdir -p if needed)", then prove the outcome with "Create a GitHub Actions workflow that lints, type-checks, and tests the codebase on every".

    Completion criteria: Attach a checklist of "Set Up CI/CD with GitHub Actions"'s steps with the observed state after each one and the verification result from "Directory .github/workflows/ exists (create with mkdir -p if needed)".

    Next step: Add Pre-commit Hooks for Lint and Tests

    ⏱ 0.5h

  2. Run "Configure a repository-managed pre-commit hook that blocks commits when linting or fast" from "Add Pre-commit Hooks for Lint and Tests" and confirm the documented result "The pre-commit command is available on PATH.".

    Prerequisites: Set Up CI/CD with GitHub Actions

    Completion criteria: Run "Add Pre-commit Hooks for Lint and Tests" twice — once as written and once with a changed input — and attach both transcripts with the observed difference.

    Next step: Fan Out CI with a GitHub Actions Matrix

    ⏱ 0.5h

  3. Apply "Fan Out CI with a GitHub Actions Matrix" to a ci task, checking that "Four jobs appear in the run, one per operating system and Node version." appears after the "Test every supported language version and operating system without duplicating the workflow" step.

    Prerequisites: Add Pre-commit Hooks for Lint and Tests

    Completion criteria: Run the steps through "Test every supported language version and operating system without duplicating the workflow", paste the command output, and mark the line that matches "Four jobs appear in the run, one per operating system and Node version."; then rerun with one parameter changed.

    Next step: Share a Docker Build Cache Across CI Runs

    ⏱ 0.5h

  4. Execute "Share a Docker Build Cache Across CI Runs" end to end, then repeat the last step with one parameter changed and compare "The second run reports CACHED for dependency layers and finishes in a fraction of the time.".

    Prerequisites: Fan Out CI with a GitHub Actions Matrix

    Completion criteria: Deliver a transcript of "Share a Docker Build Cache Across CI Runs" with each step's command and observed state, ending at "The second run reports CACHED for dependency layers and finishes in a fraction of the time.".

    Next step: Run Integration Tests With Testcontainers

    ⏱ 0.5h

  5. Run "Give integration tests a real PostgreSQL instance with the production schema, created and" from "Run Integration Tests With Testcontainers" and confirm the documented result "Both packages appear in devDependencies and the lockfile is updated.".

    Prerequisites: Share a Docker Build Cache Across CI Runs

    Completion criteria: Run "Run Integration Tests With Testcontainers" twice — once as written and once with a changed input — and attach both transcripts with the observed difference.

    Next step: Block Vulnerable Dependencies at Pull Request Time

    ⏱ 0.5h

  6. Apply "Block Vulnerable Dependencies at Pull Request Time" to a ci task, checking that "The check fails and comments the offending package, advisory, and license on the pull" appears after the "Catch a risky dependency during review instead of after it is merged and shipped in a" step.

    Prerequisites: Run Integration Tests With Testcontainers

    Completion criteria: Run the steps through "Catch a risky dependency during review instead of after it is merged and shipped in a", paste the command output, and mark the line that matches "The check fails and comments the offending package, advisory, and license on the pull"; then rerun with one parameter changed.

    Next step: Select Affected Packages for a Build

    ⏱ 0.5h

  7. In the "CI Pipeline Engineer" path, implement "Select Affected Packages for a Build" so JSON object: { changedFiles: string[], packages: [{ name, dir }], yields [api,web], including the second sample's edge case.

    Completion criteria: Attach the solution file for "CI Pipeline Engineer", two passing sample runs, and one failing run whose error matches the contract.

    Next step: Capstone: CI Pipeline Engineer

    ⏱ 0.42h

  8. Ship "Recursive directory watch" from "Build a File Watch Pipeline", then prove it with the project's test suite and an acceptance note.

    Prerequisites: Select Affected Packages for a Build

    Completion criteria: Run the project's test command for "Build a File Watch Pipeline", paste the passing output, and attach the acceptance note for "Recursive directory watch" with the test name.

    Next step: Run the capstone's tests, publish the repository, and demo it to a reviewer.

    ⏱ 4h