Compare commits

...

2 Commits

Author SHA1 Message Date
hhs
a70f151615 perf(ci): 启用 Go 模块缓存,缓存 golangci-lint 二进制
Some checks failed
GoLoom CI / Lint (push) Successful in 1m41s
GoLoom CI / Test (push) Successful in 5s
GoLoom CI / Build (push) Successful in 7s
GoLoom CI / Docker Build (push) Has been cancelled
2026-06-10 10:58:43 +08:00
hhs
04c1b6b0d2 fix(cmd): 添加 main 函数占位,修复构建失败 2026-06-10 10:55:47 +08:00
2 changed files with 19 additions and 13 deletions

View File

@@ -22,15 +22,22 @@ jobs:
uses: actions/setup-go@v5
with:
go-version: ${{ env.GO_VERSION }}
cache: true
- name: Download dependencies
run: go mod download
- name: Cache golangci-lint
uses: actions/cache@v4
with:
path: /usr/local/bin/golangci-lint
key: golangci-lint-${{ env.GOLANGCI_LINT_VERSION }}
- name: Install golangci-lint
run: |
if [ ! -f /usr/local/bin/golangci-lint ]; then
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b /usr/local/bin ${{ env.GOLANGCI_LINT_VERSION }}
fi
- name: Run golangci-lint
uses: golangci/golangci-lint-action@v4
with:
version: ${{ env.GOLANGCI_LINT_VERSION }}
args: --timeout=5m --issues-exit-code=0
run: golangci-lint run --timeout=5m --issues-exit-code=0
test:
name: Test
@@ -43,13 +50,10 @@ jobs:
uses: actions/setup-go@v5
with:
go-version: ${{ env.GO_VERSION }}
- name: Download dependencies
run: go mod download
cache: true
- name: Run tests
run: |
# 跳过无测试文件的情况
test_files=$(find . -name "*_test.go" -type f)
if [ -z "$test_files" ]; then
echo "No test files found, skipping tests"
@@ -76,9 +80,7 @@ jobs:
uses: actions/setup-go@v5
with:
go-version: ${{ env.GO_VERSION }}
- name: Download dependencies
run: go mod download
cache: true
- name: Build binary
run: |

View File

@@ -1 +1,5 @@
package main
func main() {
// TODO: 实现启动逻辑
}