workflows
Some checks failed
Go Test CI / test (push) Has been cancelled

This commit is contained in:
2025-09-24 16:26:04 +08:00
parent 86e6558c8d
commit 91505ab885

18
.github/workflows/ci.yml vendored Normal file
View File

@@ -0,0 +1,18 @@
name: Go Test CI # 工作流的名称
on: [push] # 指定触发事件当发生推送push时运行
jobs:
test: # 定义一个名为 "test" 的任务
runs-on: ubuntu-latest # 指定任务运行在最新的Ubuntu环境中
steps: # 定义任务执行的一系列步骤
- name: Checkout code # 步骤1获取代码
uses: actions/checkout@v3 # 使用官方action来检出你的代码仓库
- name: Set up Go # 步骤2设置Go环境
uses: actions/setup-go@v3 # 使用官方action来安装指定版本的Go
with:
go-version: '1.25' # 指定Go版本请根据你的项目需要修改
- name: Run Go Test # 步骤3执行 go test
run: go test ./... # 运行当前项目下所有包的测试。你也可以使用 `go test -v ./...` 来获得更详细的输出