Skip to content

Commit c5ddb30

Browse files
committed
ci: refactor workflow to improve minimal installation test
Reorder test steps and update uv commands for better dependency handling. The minimal installation test now uses proper uv syntax and the type checking and coverage steps are moved after the installation test. 移除可选依赖测试并重新排序工作流步骤,更新uv命令以改进依赖处理。 最小安装测试现在使用正确的uv语法,类型检查和覆盖率步骤移至 安装测试之后。 Change-Id: Id4b0a0f154b509a3c6cce92dce77c80c3ed5a769 Signed-off-by: OhYee <[email protected]>
1 parent 1712baf commit c5ddb30

File tree

1 file changed

+11
-12
lines changed

1 file changed

+11
-12
lines changed

.github/workflows/ci.yml

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -26,29 +26,28 @@ jobs:
2626
run: |
2727
make setup PYTHON_VERSION=${{ matrix.python-version }}
2828
29-
- name: Run type check (mypy)
30-
run: |
31-
make mypy-check
32-
33-
- name: Run tests with coverage
34-
run: |
35-
make coverage
36-
3729
- name: Run minimal installation test
3830
run: |
3931
# 创建一个临时目录用于测试
4032
mkdir -p /tmp/minimal_test
4133
cd /tmp/minimal_test
4234
4335
# 使用 uv 创建一个新环境并只安装项目的默认依赖
44-
python -m uv venv --seed
45-
source .venv/bin/activate
36+
uv venv -p 3.10
4637
4738
# 安装项目但不包含任何可选依赖
48-
python -m uv pip install "$GITHUB_WORKSPACE/.[]."
39+
uv pip install "$GITHUB_WORKSPACE/"
4940
5041
# 测试导入和版本打印
51-
python -c "import agentrun; print(f'Version: {agentrun.__version__}')"
42+
uv run python -c "import agentrun; print(f'Version: {agentrun.__version__}')"
43+
44+
- name: Run type check (mypy)
45+
run: |
46+
make mypy-check
47+
48+
- name: Run tests with coverage
49+
run: |
50+
make coverage
5251
5352
# 检测文件更改并决定是否构建测试包
5453
- name: Check for changes in agentrun directory

0 commit comments

Comments
 (0)