Skip to content

Commit

Permalink
Update CI config
Browse files Browse the repository at this point in the history
  • Loading branch information
taobig committed Jun 8, 2024
1 parent cd4e447 commit cf8584e
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,17 @@ jobs:
# 在并发情况下,同时运行的测试的数量默认取决于 GOMAXPROCS。它可以通过 -parallel n 被指定(go test -parallel 4)
# run: go test -cover -v ./...
run: |
go test -cover -v ./...
go vet ./...
# golangci-lint run #golangci-lint run --enable-all 如果手动执行,需要提前下载golangci-lint
# CI是通过golangci-lint.yml配置文件启用的
# 从go1.20开始test子命令才支持-skip参数
if [[ "${{ matrix.go-version }}" < "1.20" ]]; then
go test -cover -v ./...
go test -race -v ./...
else
go test -skip "^TestSendMail$" -cover -v ./...
go test -race -skip "^TestSendMail$" -skip "^TestDataRaceError$" -v ./...
fi
go vet ./...
# golangci-lint run #golangci-lint run --enable-all 如果手动执行,需要提前下载golangci-lint
# CI是通过golangci-lint.yml配置文件启用的


- name: Test Parallel
Expand Down

0 comments on commit cf8584e

Please sign in to comment.