Update test.yml

This commit is contained in:
2024-09-21 21:55:36 +08:00
committed by GitHub
parent 1237004cb1
commit a5c8c2ac97

View File

@@ -18,7 +18,7 @@ jobs:
matrix: matrix:
goos: [linux, windows] # 指定要构建的操作系统 goos: [linux, windows] # 指定要构建的操作系统
goarch: [amd64] # 指定架构 goarch: [amd64] # 指定架构
go_variant: [default, alpine] # 使用默认和 Alpine 版本打包 Linux go_variant: [default] # 使用默认和 Alpine 版本打包 Linux
steps: steps:
- name: Checkout code - name: Checkout code
@@ -28,7 +28,8 @@ jobs:
uses: actions/setup-go@v4 uses: actions/setup-go@v4
with: with:
go-version: '1.22' # 选择 Go 版本 go-version: '1.22' # 选择 Go 版本
- name: tidy
run: go mod tidy
# 如果是 Linux 或 Alpine需要安装 SQLite 依赖 # 如果是 Linux 或 Alpine需要安装 SQLite 依赖
- name: Install SQLite dependencies (Linux/Alpine) - name: Install SQLite dependencies (Linux/Alpine)
if: matrix.goos == 'linux' # 仅在 Linux 下运行 if: matrix.goos == 'linux' # 仅在 Linux 下运行