-
Notifications
You must be signed in to change notification settings - Fork 2
161 lines (127 loc) · 4.9 KB
/
Copy pathci.yml
File metadata and controls
161 lines (127 loc) · 4.9 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
name: CI
on:
pull_request:
push:
branches:
- main
- master
- "open-source/**"
jobs:
test:
runs-on: ubuntu-latest
env:
KSADK_WEB_VERSION: "0.3.0"
steps:
- uses: actions/checkout@v4
- name: Install uv
uses: astral-sh/setup-uv@v5
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: Set up pnpm
uses: pnpm/action-setup@v4
with:
version: 9
- name: Set up Node
uses: actions/setup-node@v4
with:
node-version: "20"
cache: pnpm
cache-dependency-path: docs-site/pnpm-lock.yaml
- name: Install dependencies
run: uv sync --extra all
- name: Sync KsADK Web static assets
run: make public-sync-ksadk-web-static
- name: Build package artifacts
run: uv build
- name: Run public release gate tests
run: make public-test
- name: Audit public repository candidate
run: uv run --extra dev python scripts/open_source_audit.py --target public-repo
- name: Build and audit public docs
run: make docs-site-build
- name: Check package metadata
run: uv run --extra dev python -m twine check dist/*
- name: Audit wheel and sdist file lists
run: make open-source-audit-dist
# goal-00: google-adk 多版本 matrix。依赖窗口 >=1.34.0,<3.0,
# 对最低锚点 1.34.x 与最新 2.x(2.5.x)各跑一遍全量测试,防止任何一端回归。
# 版本差异统一由 ksadk/compat/adk_compat.py 收口(见 docs/adk-multi-version-compat.md)。
test-adk-matrix:
name: full pytest (google-adk ${{ matrix.google-adk }})
runs-on: ubuntu-latest
env:
KSADK_WEB_VERSION: "0.3.0"
strategy:
fail-fast: false
matrix:
google-adk: ["1.34.3", "2.5.0"]
steps:
- uses: actions/checkout@v4
- name: Install uv
uses: astral-sh/setup-uv@v5
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: Install dependencies
run: uv sync --extra all
- name: Pin google-adk for this matrix leg
run: uv pip install "google-adk==${{ matrix.google-adk }}"
- name: Verify google-adk version
run: uv run --no-sync python -c "from importlib.metadata import version; print('google-adk', version('google-adk'))"
# Static web assets are deliberately not tracked in the Python source
# tree; fetch and verify the released npm payload before wheel build.
- name: Sync KsADK Web static assets
run: make public-sync-ksadk-web-static
# Packaging tests inspect the wheel itself; build it in each isolated ADK
# environment rather than depending on an artifact from another job.
- name: Build package artifacts
run: uv build
# --no-sync: 防止 uv run 按 lock 重新同步、把上一步行覆盖的 adk 版本回退。
- name: Run full test suite
run: uv run --no-sync pytest tests/ -q
# goal-16: Windows a2a 命令 bug 回归(用户首报:"No such command 'a2a'")。
# 在本机 macOS 无法闭环 Windows,故 CI 加 Windows runner 跑 CLI smoke:
# `agentengine a2a -h` 退出码 0,且 a2a 命令确已注册(非 try/except ImportError 静默吞)。
test-cli-windows:
name: CLI smoke (windows-latest, a2a -h 注册回归)
runs-on: windows-latest
env:
# GitHub's non-interactive Windows output can default to cp1252 while
# KsADK's public CLI help includes Chinese text.
PYTHONUTF8: "1"
steps:
- uses: actions/checkout@v4
- name: Install uv
uses: astral-sh/setup-uv@v5
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: Install dependencies
run: uv sync --extra all
- name: a2a -h exits 0
run: uv run --no-sync agentengine a2a -h
- name: a2a command is registered (no silent ImportError swallow)
run: uv run --no-sync python -c "from ksadk.cli import _register_commands, cli; _register_commands(); assert 'a2a' in cli.commands, 'a2a command was silently swallowed'; print('a2a registered OK')"
test-codex-native-runtime:
name: Codex native ManagedRuntime (${{ matrix.os }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [macos-latest, windows-latest, ubuntu-latest]
steps:
- uses: actions/checkout@v4
- name: Install uv
uses: astral-sh/setup-uv@v5
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: Install KsADK and native Codex runtime
run: uv sync --extra dev --extra codex
- name: Import platform package, resolve binary, and start local Web
run: uv run --no-sync pytest tests/test_managed_runtime_native_smoke.py -q