Skip to content

Commit 46e8127

Browse files
committed
Add packaged CLI smoke tests
1 parent e05c09c commit 46e8127

2 files changed

Lines changed: 53 additions & 0 deletions

File tree

.github/workflows/ci.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,3 +84,41 @@ jobs:
8484
- name: Run Linux TShark integration smoke tests
8585
run: |
8686
pytest tests/test_client.py -k "real_tshark" -v
87+
88+
package-smoke:
89+
runs-on: ${{ matrix.os }}
90+
strategy:
91+
fail-fast: false
92+
matrix:
93+
os: [ubuntu-latest, windows-latest, macos-latest]
94+
95+
steps:
96+
- uses: actions/checkout@v6
97+
98+
- name: Set up Python
99+
uses: actions/setup-python@v6
100+
with:
101+
python-version: "3.12"
102+
103+
- name: Install build tools
104+
run: |
105+
python -m pip install --upgrade pip
106+
pip install build
107+
108+
- name: Build package
109+
run: python -m build
110+
111+
- name: Validate packaged skill files
112+
run: |
113+
python -c "import glob, os, zipfile; wheel = max(glob.glob('dist/*.whl'), key=os.path.getmtime); names = set(zipfile.ZipFile(wheel).namelist()); assert any(name.endswith('wireshark_mcp/skills/wireshark-traffic-analysis/SKILL.md') for name in names), 'Skill package missing from wheel'"
114+
115+
- name: Install built wheel
116+
run: |
117+
python -c "import glob, os, subprocess, sys; wheel = max(glob.glob('dist/*.whl'), key=os.path.getmtime); subprocess.check_call([sys.executable, '-m', 'pip', 'install', '--force-reinstall', wheel])"
118+
119+
- name: Run packaged CLI smoke tests
120+
run: |
121+
wireshark-mcp --version
122+
python -m wireshark_mcp.server --version
123+
wireshark-mcp --config
124+
wireshark-mcp --doctor

.github/workflows/publish.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,21 @@ jobs:
2626
2727
- name: Build package
2828
run: python -m build
29+
30+
- name: Validate built wheel contents
31+
run: |
32+
python -c "import glob, os, zipfile; wheel = max(glob.glob('dist/*.whl'), key=os.path.getmtime); names = set(zipfile.ZipFile(wheel).namelist()); assert any(name.endswith('wireshark_mcp/skills/wireshark-traffic-analysis/SKILL.md') for name in names), 'Skill package missing from wheel'"
33+
34+
- name: Install built wheel
35+
run: |
36+
python -c "import glob, os, subprocess, sys; wheel = max(glob.glob('dist/*.whl'), key=os.path.getmtime); subprocess.check_call([sys.executable, '-m', 'pip', 'install', '--force-reinstall', wheel])"
37+
38+
- name: Run release smoke tests
39+
run: |
40+
wireshark-mcp --version
41+
python -m wireshark_mcp.server --version
42+
wireshark-mcp --config
43+
wireshark-mcp --doctor
2944
3045
- name: Publish to PyPI
3146
uses: pypa/gh-action-pypi-publish@release/v1

0 commit comments

Comments
 (0)