我们可以在Github Action配置中使用多种语言吗?

huangapple go评论85阅读模式
英文:

Can we use many language on Github Action Configuration

问题

我想在Github Action上为QA自动化创建CI。但是有多种语言用于安装依赖。我可以在同一个文件中同时使用NodeJS和Golang吗?

我阅读了Github Action的文档,但是每种语言都有自己的配置,没有同时支持两种语言的配置。有没有参考资料或者想法可以使用?

英文:

I want to create CI on Github Action for QA Automation. But there is multiple language are use to install dependecies. Can i use NodeJS and Golang at the same file?

I read the documentation of Github Action, but there is configuration for each language not both. Any reference or idea i can use?

答案1

得分: 2

简而言之,你需要编写一个清单文件(使用YAML格式),并告诉GitHub Actions构建代理程序执行你想要的命令,以自动化的方式进行操作。可以看到,这并没有与特定的编程语言绑定。

你会看到针对每种编程语言的示例/教程,这只是因为这是新用户/开发者开始使用CI/CD系统的方式,如果专注于单个编程语言的生态系统,编写必要的步骤会更容易。

然而,如果GitHub管理的GitHub Actions构建机器几乎预先安装了所有工具,所以当然可以在同一个清单中使用Node.js和Golang工具,而不需要任何特定的引用。

如果你愿意,可以打开图像页面了解预安装了哪些工具。

尝试将多个清单合并为一个,你将看到它是如何工作的。

英文:

In short, you write a manifest file (in YAML) and tell GitHub Actions build agent(s) to execute the commands you wanted in an automatic way. See, there is nothing there bind to a single programming language.

You see per language samples/tutorials, simply because that's how new users/developers to get started with a CI/CD system, and it is easy to write up the necessary steps if focusing on the ecosystem of a single programming language.

The underlying GitHub Actions build machines (if managed by GitHub), however, have almost everything pre-installed, so of course you can use Node.js and Golang tools in the same manifest and you don't need any specific reference.

> Open the image pages and learn what tools are preinstalled if you like.

Try it out by combining multiple manifests into the single one, and you will see how it works out.

huangapple
  • 本文由 发表于 2023年1月4日 09:22:29
  • 转载请务必保留本文链接:https://go.coder-hub.com/75000125.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定