Files
EntitleForge-SDK-go/.gitea/workflows/ci.yml
T
iceking2nd c854215dc9
sdk-ci / test (push) Successful in 1m44s
fix(ci): 依赖闭包断言误报——改用 go list -m 权威判据
go list -deps 会列出标准库内部带版本号的包(如 crypto/internal/entropy/v1.0.0),
被旧脚本的点号过滤误判为第三方依赖。模块级零 require 才是红线本意。
2026-11-09 18:28:19 +08:00

33 lines
1.1 KiB
YAML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# 益铸 EntitleForge SDK CI(Gitea Actions;零第三方依赖库,流水线同样零 action 依赖)
name: sdk-ci
on:
push:
branches: ["*"]
tags: ["v*"]
pull_request:
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: "1.27"
mirror: https://mirrors.aliyun.com/golang/
- name: 全量测试(race + shuffle)
run: go test -race -shuffle=on ./...
- name: 依赖闭包断言(零第三方依赖红线,go list -m 权威判据)
run: |
MODS=$(go list -m all | grep -v "^git.wxccs.org/EntitleForge/EntitleForge-SDK-go" || true)
if [ -n "$MODS" ]; then
echo "SDK 引入了模块依赖(违反零依赖红线):"; echo "$MODS"; exit 1
fi
echo "依赖闭包:go.mod 零 require ✓(纯标准库)"
- name: 交叉编译冒烟(CGO free)
run: |
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build ./...
CGO_ENABLED=0 GOOS=windows GOARCH=amd64 go build ./...
CGO_ENABLED=0 GOOS=darwin GOARCH=arm64 go build ./...