Skip to content

Commit 273b284

Browse files
committed
ci: add PR workflow with lint/build/test matrix and docs-check
.github/workflows/ci.yml runs on pull_request and push(main) with contents:read scope. Matrix job iterates Go 1.23.x (module minimum) and 1.26.x, invoking make lint (gofmt + go vet) → make build → make test (offline). docs-check runs on a single pinned Go version (1.26.x) — go/doc rendering varies across Go versions so drift must be judged against exactly one toolchain. Verified locally: all four commands green. Task: 1789870148
1 parent 202dd0f commit 273b284

1 file changed

Lines changed: 54 additions & 0 deletions

File tree

‎.github/workflows/ci.yml‎

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
# PR CI baseline for qoder-cloud-agents-sdk-go.
2+
#
3+
# Matrix job (`check`) runs make lint → make build → make test across the
4+
# module's minimum Go version and a recent stable release. The docs-check job
5+
# runs on a single pinned Go version (matches the toolchain used to author
6+
# docs/api/reference.md) — go/doc rendering varies across Go versions, so
7+
# doc drift must be judged against exactly one.
8+
#
9+
# All jobs are offline: `make test` = test-unit (with the offline live
10+
# subset) + test-contract, no live tags, no PAT, no external Aliyun deps.
11+
name: ci
12+
13+
on:
14+
pull_request:
15+
push:
16+
branches: [main]
17+
18+
permissions:
19+
contents: read
20+
21+
jobs:
22+
check:
23+
name: check (${{ matrix.go-version }})
24+
runs-on: ubuntu-latest
25+
strategy:
26+
fail-fast: false
27+
matrix:
28+
go-version: ["1.23.x", "1.26.x"]
29+
steps:
30+
- uses: actions/checkout@v4
31+
- uses: actions/setup-go@v5
32+
with:
33+
go-version: ${{ matrix.go-version }}
34+
cache: true
35+
- name: make lint
36+
run: make lint
37+
- name: make build
38+
run: make build
39+
- name: make test
40+
run: make test
41+
42+
docs-check:
43+
name: docs-check
44+
runs-on: ubuntu-latest
45+
steps:
46+
- uses: actions/checkout@v4
47+
- uses: actions/setup-go@v5
48+
with:
49+
# Pinned to a single toolchain version — matches the version used
50+
# to regenerate docs/api/reference.md locally. Bump both together.
51+
go-version: "1.26.x"
52+
cache: true
53+
- name: make docs-check
54+
run: make docs-check

0 commit comments

Comments
 (0)