@@ -0,0 +1,22 @@
|
||||
name: CI
|
||||
|
||||
on:
|
||||
push:
|
||||
pull_request:
|
||||
|
||||
jobs:
|
||||
test:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version: "1.26.5"
|
||||
- name: gofmt 检查
|
||||
run: test -z "$(gofmt -l .)"
|
||||
- name: go vet
|
||||
run: go vet ./...
|
||||
- name: 测试
|
||||
run: go test ./...
|
||||
- name: 交叉编译(嵌入当前 dist,占位亦可)
|
||||
run: CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -trimpath -ldflags "-s -w" -o /tmp/oci-portal-server ./cmd/server
|
||||
Reference in New Issue
Block a user