> For the complete documentation index, see [llms.txt](https://denglj.gitbook.io/essential-go/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://denglj.gitbook.io/essential-go/common-standard-libraries/57-testing-code-with-ci-services.md).

# 57 利用持续集成(CI)服务测试代码

在每次更改代码之后自动运行测试，并在测试失败时得到通知不是很好吗？

提供此类功能是托管CI（连续集成）服务的基本价值主张。

它们在云中运行服务器，与代码托管服务（最有可能的是 GitHub）集成，并在每次代码推送中运行你提供的代码。

该代码可能只是测试而已，例如 构建二进制文件，打包它们以进行分发，然后上传到S3或Google Cloud Storage等在线存储。
