# 01 · ci-local-script **演示**:把 CI 拆成「步骤列表 + 子进程 + 退出码」,本地一条命令复现;失败步骤聚合后在摘要里点名,而不是第一个失败就静默退出。 **运行**: ```sh uv run python examples/39-ci-cd-release-pipeline/01-ci-local-script/ci_local_script.py ``` **预期输出**(3.12.9): ```text clean: {'lint': 0, 'typecheck': 0, 'test': 0} clean pipeline: passed (3 steps) broken: {'lint': 0, 'typecheck': 3, 'test': 0} broken pipeline: failed (1/3: typecheck) ``` **依赖**:仅标准库(`subprocess`/`sys`)。 **注意**:CI 的每个 step 本质都是「命令 + 退出码」;`check=False` 才能拿到非零码而不是抛异常。生产脚本应在最后 `sys.exit(1)` 让流水线失败。