sdk-ci / test (push) Failing after 10s
- ci 加 actions/setup-go(此前 runner 无 go 直接失败);交叉编译笔误修正 - 新增 release.yml(v* tag:发布前测试 + Gitea Release + 源码包附件 + 发版成功后清理失败 action 记录) - README 相对链接(../EntitleForge)在 Gitea 网页 404 → 绝对 URL
37 lines
1.2 KiB
YAML
37 lines
1.2 KiB
YAML
# 益铸 EntitleForge SDK CI(Gitea Actions;零第三方依赖库,流水线同样零 action 依赖)
|
||
name: sdk-ci
|
||
|
||
on:
|
||
push:
|
||
branches: ["*"]
|
||
tags: ["v*"]
|
||
pull_request:
|
||
|
||
env:
|
||
CGO_ENABLED: "0"
|
||
|
||
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: 依赖闭包断言(零第三方依赖红线)
|
||
run: |
|
||
DEPS=$(go list -deps ./... | grep -vE "^(internal|vendor)/" | grep "\." | \
|
||
grep -v "^git.wxccs.org/EntitleForge/EntitleForge-SDK-go" || true)
|
||
if [ -n "$DEPS" ]; then
|
||
echo "SDK 引入了第三方依赖(违反零依赖红线):"; echo "$DEPS"; exit 1
|
||
fi
|
||
echo "依赖闭包:纯标准库 ✓"
|
||
- 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 ./...
|