This commit is contained in:
39
.gitea/workflows/ci.yml
Normal file
39
.gitea/workflows/ci.yml
Normal file
@@ -0,0 +1,39 @@
|
||||
name: CI
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
|
||||
jobs:
|
||||
verify:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Setup Go
|
||||
uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version-file: go.mod
|
||||
cache: true
|
||||
|
||||
- name: Verify formatting
|
||||
run: |
|
||||
gofmt -w $(find . -name '*.go' -not -path './vendor/*')
|
||||
git diff --exit-code
|
||||
|
||||
- name: Run unit and integration tests
|
||||
run: go test ./... -count=1
|
||||
|
||||
- name: Run race tests
|
||||
run: go test -race ./...
|
||||
|
||||
- name: Run vet
|
||||
run: go vet ./...
|
||||
|
||||
- name: Check Gate scripts syntax
|
||||
run: |
|
||||
bash -n scripts/verify_preprod_gate_b.sh
|
||||
bash -n scripts/verify_gate_c_rollback.sh
|
||||
@@ -128,6 +128,7 @@ go vet ./...
|
||||
- 仓库审阅归属见 [.github/CODEOWNERS](.github/CODEOWNERS)
|
||||
- PR 会自动执行基础 CI:
|
||||
`go test ./... -count=1`、`go test -race ./...`、`go vet ./...`、Gate 脚本语法检查
|
||||
- GitHub 使用 [`.github/workflows/ci.yml`](.github/workflows/ci.yml),Gitea/TKSea 使用 [`.gitea/workflows/ci.yml`](.gitea/workflows/ci.yml)
|
||||
- 变更配置契约时,必须同步更新:
|
||||
- `docs/CONFIG_CONTRACT_BASELINE.md`
|
||||
- `test/QA_GATE_STATUS.md`
|
||||
|
||||
Reference in New Issue
Block a user