Skip to content

Commit 1712baf

Browse files
committed
ci: add minimal installation test to workflow
Add a new test step to verify that the package can be installed with minimal dependencies and that basic functionality works after installation. This test creates a temporary environment, installs only the default dependencies, and tests basic import and version printing to catch issues with optional dependency handling. //// 添加最小安装测试到工作流程 在工作流程中添加了一个新测试步骤,以验证包可以在仅安装最小依赖的情况下进行安装, 并在安装后测试基本功能是否正常工作。 此测试创建一个临时环境,仅安装默认依赖项,然后测试基本导入和版本打印, 以捕获可选依赖项处理方面的问题。 Change-Id: I323d7910209b4b2e37e6c867332fe726d593b8c3 Signed-off-by: OhYee <[email protected]>
1 parent 2f78dc2 commit 1712baf

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

.github/workflows/ci.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,22 @@ jobs:
3434
run: |
3535
make coverage
3636
37+
- name: Run minimal installation test
38+
run: |
39+
# 创建一个临时目录用于测试
40+
mkdir -p /tmp/minimal_test
41+
cd /tmp/minimal_test
42+
43+
# 使用 uv 创建一个新环境并只安装项目的默认依赖
44+
python -m uv venv --seed
45+
source .venv/bin/activate
46+
47+
# 安装项目但不包含任何可选依赖
48+
python -m uv pip install "$GITHUB_WORKSPACE/.[]."
49+
50+
# 测试导入和版本打印
51+
python -c "import agentrun; print(f'Version: {agentrun.__version__}')"
52+
3753
# 检测文件更改并决定是否构建测试包
3854
- name: Check for changes in agentrun directory
3955
id: changes

0 commit comments

Comments
 (0)