You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Add crowdin translations
* Run script/i18n/homogenize-frontmatter.js
* Run script/i18n/lint-translation-files.js --check parsing
* Run script/i18n/lint-translation-files.js --check rendering
* run script/i18n/reset-files-with-broken-liquid-tags.js --language=cn
* run script/i18n/reset-known-broken-translation-files.js
* Check in cn CSV report
Co-authored-by: Robert Sese <[email protected]>
intro: 'You can create custom continuous integration (CI) workflows directly in your {% data variables.product.prodname_dotcom %} repository with {% data variables.product.prodname_actions %}.'
4
4
redirect_from:
5
5
- /articles/about-continuous-integration
@@ -15,46 +15,46 @@ versions:
15
15
type: overview
16
16
topics:
17
17
- CI
18
-
shortTitle: 持续集成
18
+
shortTitle: Continuous integration
19
19
---
20
20
21
21
{% data reusables.actions.enterprise-beta %}
22
22
{% data reusables.actions.enterprise-github-hosted-runners %}
Continuous integration (CI) is a software practice that requires frequently committing code to a shared repository. Committing code more often detects errors sooner and reduces the amount of code a developer needs to debug when finding the source of an error. Frequent code updates also make it easier to merge changes from different members of a software development team. This is great for developers, who can spend more time writing code and less time debugging errors or resolving merge conflicts.
When you commit code to your repository, you can continuously build and test the code to make sure that the commit doesn't introduce errors. Your tests can include code linters (which check style formatting), security checks, code coverage, functional tests, and other custom checks.
29
29
30
-
创建和测试代码需要服务器。 您可以在推送代码到仓库之前在本地创建并测试更新,也可以使用 CI 服务器检查仓库中的新代码提交。
30
+
Building and testing your code requires a server. You can build and test updates locally before pushing code to a repository, or you can use a CI server that checks for new code commits in a repository.
31
31
32
-
## 关于使用 {% data variables.product.prodname_actions %} 的持续集成
32
+
## About continuous integration using {% data variables.product.prodname_actions %}
33
33
34
-
{% ifversion ghae %}使用 {% data variables.product.prodname_actions %} 的 CI 提供可以在仓库中构建代码并运行测试的工作流程。 Workflows can run on runner systems that you host. 更多信息请参阅“[关于自托管运行器](/actions/hosting-your-own-runners/about-self-hosted-runners)”。
35
-
{% else %}使用 {% data variables.product.prodname_actions %} 的 CI 提供可以在仓库中构建代码并运行测试的工作流程。 工作流程可在 {% data variables.product.prodname_dotcom %} 托管的虚拟机或您自行托管的机器上运行。 更多信息请参阅“[{% data variables.product.prodname_dotcom %} 托管的运行器的虚拟环境](/actions/automating-your-workflow-with-github-actions/virtual-environments-for-github-hosted-runners)”和“[关于自托管运行器](/actions/automating-your-workflow-with-github-actions/about-self-hosted-runners)”。
34
+
{% ifversion ghae %}CI using {% data variables.product.prodname_actions %} offers workflows that can build the code in your repository and run your tests. Workflows can run on runner systems that you host. For more information, see "[About self-hosted runners](/actions/hosting-your-own-runners/about-self-hosted-runners)."
35
+
{% else %} CI using {% data variables.product.prodname_actions %} offers workflows that can build the code in your repository and run your tests. Workflows can run on {% data variables.product.prodname_dotcom %}-hosted virtual machines, or on machines that you host yourself. For more information, see "[Virtual environments for {% data variables.product.prodname_dotcom %}-hosted runners](/actions/automating-your-workflow-with-github-actions/virtual-environments-for-github-hosted-runners)" and "[About self-hosted runners](/actions/automating-your-workflow-with-github-actions/about-self-hosted-runners)."
36
36
{% endif %}
37
37
38
-
您可以配置 CI 工作流程在 {% data variables.product.prodname_dotcom %} 事件发生时运行(例如,当新代码推送到您的仓库时)、按设定的时间表运行,或者在使用仓库分发 web 挂钩的外部事件发生时运行。
38
+
You can configure your CI workflow to run when a {% data variables.product.prodname_dotcom %} event occurs (for example, when new code is pushed to your repository), on a set schedule, or when an external event occurs using the repository dispatch webhook.
39
39
40
-
{% data variables.product.product_name %} 运行 CI 测试并在拉取请求中提供每次测试的结果,因此您可以查看分支中的更改是否引入错误。 如果工作流程中的所有 CI 测试通过,您推送的更改可供团队成员审查或合并 如果测试失败,则是其中某项更改导致了失败。
40
+
{% data variables.product.product_name %} runs your CI tests and provides the results of each test in the pull request, so you can see whether the change in your branch introduces an error. When all CI tests in a workflow pass, the changes you pushed are ready to be reviewed by a team member or merged. When a test fails, one of your changes may have caused the failure.
41
41
42
-
如果在仓库中设置了 CI,{% data variables.product.product_name %} 会分析仓库中的代码,并根据仓库中的语言和框架推荐 CI 工作流程。 For example, if you use [Node.js](https://nodejs.org/en/), {% data variables.product.product_name %} will suggest a starter workflow that installs your Node.js packages and runs your tests. You can use the CI starter workflow suggested by {% data variables.product.product_name %}, customize the suggested starter workflow, or create your own custom workflow file to run your CI tests.
42
+
When you set up CI in your repository, {% data variables.product.product_name %} analyzes the code in your repository and recommends CI workflows based on the language and framework in your repository. For example, if you use [Node.js](https://nodejs.org/en/), {% data variables.product.product_name %} will suggest a starter workflow that installs your Node.js packages and runs your tests. You can use the CI starter workflow suggested by {% data variables.product.product_name %}, customize the suggested starter workflow, or create your own custom workflow file to run your CI tests.
43
43
44
44

45
45
46
-
除了帮助设置项目的 CI 工作流程之外,您还可以使用 {% data variables.product.prodname_actions %} 创建跨整个软件开发生命周期的工作流程。 例如,您可以使用操作来部署、封装或发行项目。 更多信息请参阅“[关于 {% data variables.product.prodname_actions %}](/articles/about-github-actions)”。
46
+
In addition to helping you set up CI workflows for your project, you can use {% data variables.product.prodname_actions %} to create workflows across the full software development life cycle. For example, you can use actions to deploy, package, or release your project. For more information, see "[About {% data variables.product.prodname_actions %}](/articles/about-github-actions)."
47
47
48
-
有关常用术语的定义,请参阅“[{% data variables.product.prodname_actions %} 的核心概念](/github/automating-your-workflow-with-github-actions/core-concepts-for-github-actions)”。
48
+
For a definition of common terms, see "[Core concepts for {% data variables.product.prodname_actions %}](/github/automating-your-workflow-with-github-actions/core-concepts-for-github-actions)."
49
49
50
50
## Starter workflow
51
51
52
52
{% data variables.product.product_name %} offers CI starter workflow for a variety of languages and frameworks.
53
53
54
54
Browse the complete list of CI starter workflow offered by {% data variables.product.company_short %} in the {% ifversion fpt or ghec %}[actions/starter-workflows](https://github.com/actions/starter-workflows/tree/main/ci) repository{% else %} `actions/starter-workflows` repository on {% data variables.product.product_location %}{% endif %}.
55
55
56
-
## 延伸阅读
56
+
## Further reading
57
57
58
58
{% ifversion fpt or ghec %}
59
-
- "[管理 {% data variables.product.prodname_actions %} 的计费](/billing/managing-billing-for-github-actions)"
59
+
- "[Managing billing for {% data variables.product.prodname_actions %}](/billing/managing-billing-for-github-actions)"
Copy file name to clipboardExpand all lines: translations/zh-CN/content/actions/automating-builds-and-tests/building-and-testing-java-with-ant.md
+1-1
Original file line number
Diff line number
Diff line change
@@ -76,7 +76,7 @@ jobs:
76
76
2.`setup-java` 步骤配置 Adoptium 的 Java 11 JDK。
77
77
3. “使用 Ant 构建”步骤以非交互模式运行 `build.xml` 中的默认目标。
78
78
79
-
The default starter workflows are excellent starting points when creating your build and test workflow, and you can customize the starter workflow to suit your project’s needs.
{% data reusables.actions.enterprise-setup-prereq %}
42
42
43
-
## Using the Gradle starter workflow
43
+
## 使用 Gradle 初学者工作流程
44
44
45
-
{% data variables.product.prodname_dotcom %} provides a Gradle starter workflow that will work for most Gradle-based Java projects. For more information, see the [Gradle starter workflow](https://github.com/actions/starter-workflows/blob/main/ci/gradle.yml).
To get started quickly, you can choose the preconfigured Gradle starter workflow when you create a new workflow. 更多信息请参阅“[{% data variables.product.prodname_actions %} 快速入门](/actions/quickstart)”。
47
+
要快速开始,您可以在创建新工作流程时选择预配置的 Gradle 初学者工作流程。 更多信息请参阅“[{% data variables.product.prodname_actions %} 快速入门](/actions/quickstart)”。
48
48
49
49
您也可以通过在仓库的 `.github/workflow` 目录中创建新文件来手动添加此工作流程。
50
50
@@ -79,9 +79,9 @@ jobs:
79
79
1.`checkout` 步骤在运行器上下载仓库的副本。
80
80
2.`setup-java` 步骤配置 Adoptium 的 Java 11 JDK。
81
81
3. “验证 Gradle 包装器”步骤验证源树中存在的 Gradle Wrapper JAR 文件的校验和。
82
-
4.The "Build with Gradle" step does a build using the `gradle/gradle-build-action` action provided by the Gradle organization on {% data variables.product.prodname_dotcom %}. The action takes care of invoking Gradle, collecting results, and caching state between jobs. For more information see [`gradle/gradle-build-action`](https://github.com/gradle/gradle-build-action).
The default starter workflows are excellent starting points when creating your build and test workflow, and you can customize the starter workflow to suit your project’s needs.
{% data reusables.actions.example-github-runner %}
87
87
@@ -114,9 +114,9 @@ steps:
114
114
115
115
## 缓存依赖项
116
116
117
-
When using {% data variables.product.prodname_dotcom %}-hosted runners, your build dependencies can be cached to speed up your workflow runs. After a successful run, the `gradle/gradle-build-action`caches important parts of the Gradle user home directory. In future jobs, the cache will be restored so that build scripts won't need to be recompiled and dependencies won't need to be downloaded from remote package repositories.
Caching is enabled by default when using the `gradle/gradle-build-action`action. For more information, see [`gradle/gradle-build-action`](https://github.com/gradle/gradle-build-action#caching).
0 commit comments