> 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等在线存储。


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://denglj.gitbook.io/essential-go/common-standard-libraries/57-testing-code-with-ci-services.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
