Files
EntitleForge-SDK-go/.gitea/workflows/ci.yml
T
2026-11-14 22:02:38 +08:00

39 lines
1.3 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:
env:
GOPROXY: https://goproxy.cn,direct
GOSUMDB: "off"
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: "1.27.4"
mirror: https://mirrors.aliyun.com/golang/
- name: 全量测试(race + shuffle)
run: go test -race -shuffle=on ./...
- name: 解码 fuzz(15s 冒烟)
run: go test ./license -run '^$' -fuzz FuzzDecode -fuzztime 15s
- 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 ./...