Some checks failed
ci / build + vet + guard + race (push) Has been cancelled
最小可跑 CI。ubuntu-latest + setup-go@v5 + Go 1.23,模块缓存开启。push/PR 到 main 触发;同 ref 并发取消;10 min 超时。不依赖 Docker / Postgres (集成测试留 testcontainers PR)。 闭掉 harness-health W3 partial 的前置条件之一。
45 lines
794 B
YAML
45 lines
794 B
YAML
name: ci
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
pull_request:
|
|
branches: [main]
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
build-test:
|
|
name: build + vet + guard + race
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 10
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Setup Go
|
|
uses: actions/setup-go@v5
|
|
with:
|
|
go-version: '1.23'
|
|
cache: true
|
|
|
|
- name: Download modules
|
|
run: go mod download
|
|
|
|
- name: Build
|
|
run: go build ./...
|
|
|
|
- name: Vet
|
|
run: go vet ./...
|
|
|
|
- name: Guard (G1/G6/G11/G12/G13)
|
|
run: make guard
|
|
|
|
- name: Test (race)
|
|
run: go test -race -timeout 5m ./...
|