Skip to content

Commit ddcfb55

Browse files
Test wheel
Signed-off-by: Mrinal Chaturvedi <mrinal.chaturvedi27@gmail.com>
1 parent 9f43571 commit ddcfb55

2 files changed

Lines changed: 59 additions & 0 deletions

File tree

.github/workflows/python-cli-publish.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,13 @@ jobs:
3131
- name: Build package
3232
run: make build-python-cli
3333

34+
- name: Verify wheel install
35+
run: |
36+
python -m venv /tmp/agentcube-cli-smoke
37+
/tmp/agentcube-cli-smoke/bin/python -m pip install --upgrade pip
38+
/tmp/agentcube-cli-smoke/bin/python -m pip install cmd/cli/dist/*.whl
39+
/tmp/agentcube-cli-smoke/bin/kubectl-agentcube --help
40+
3441
- name: Read package version
3542
id: package
3643
working-directory: cmd/cli
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
name: Python CLI Tests
2+
3+
on:
4+
pull_request:
5+
merge_group:
6+
7+
jobs:
8+
python-cli-tests:
9+
runs-on: ubuntu-latest
10+
11+
steps:
12+
- name: Checkout code
13+
uses: actions/checkout@v4
14+
15+
- name: Filter paths
16+
id: changes
17+
uses: dorny/paths-filter@v3
18+
with:
19+
filters: |
20+
cli:
21+
- "cmd/cli/**"
22+
- "Makefile"
23+
- ".github/workflows/python-cli-tests.yml"
24+
25+
- name: Setup Python
26+
if: steps.changes.outputs.cli == 'true'
27+
uses: actions/setup-python@v5
28+
with:
29+
python-version: "3.12"
30+
31+
- name: Install dependencies
32+
if: steps.changes.outputs.cli == 'true'
33+
run: |
34+
python -m pip install --upgrade pip
35+
python -m pip install build pytest setuptools
36+
python -m pip install -e ./cmd/cli
37+
38+
- name: Run unit tests
39+
if: steps.changes.outputs.cli == 'true'
40+
run: python -m pytest cmd/cli/tests -q
41+
42+
- name: Build CLI package
43+
if: steps.changes.outputs.cli == 'true'
44+
run: make build-python-cli
45+
46+
- name: Verify wheel install
47+
if: steps.changes.outputs.cli == 'true'
48+
run: |
49+
python -m venv /tmp/agentcube-cli-smoke
50+
/tmp/agentcube-cli-smoke/bin/python -m pip install --upgrade pip
51+
/tmp/agentcube-cli-smoke/bin/python -m pip install cmd/cli/dist/*.whl
52+
/tmp/agentcube-cli-smoke/bin/kubectl-agentcube --help

0 commit comments

Comments
 (0)