Skip to content

Commit 7a78109

Browse files
committed
ci: smoke test python package installs
1 parent 52a18b5 commit 7a78109

2 files changed

Lines changed: 33 additions & 0 deletions

File tree

.github/workflows/ci.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,3 +44,14 @@ jobs:
4444

4545
- name: Check distribution metadata
4646
run: uvx twine check dist/*
47+
48+
- name: Smoke test wheel install
49+
run: |
50+
set -euo pipefail
51+
52+
smoke_dir="$(mktemp -d)"
53+
python -m venv "$smoke_dir/.venv"
54+
. "$smoke_dir/.venv/bin/activate"
55+
python -m pip install --upgrade pip
56+
python -m pip install dist/*.whl
57+
python -c 'from calle import CalleClient; print(CalleClient)'

.github/workflows/publish-python.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,3 +85,25 @@ jobs:
8585
fi
8686
8787
curl --fail --silent --show-error "$url" >/dev/null
88+
89+
- name: Smoke test published package install
90+
run: |
91+
set -euo pipefail
92+
93+
version="$(python -c 'import tomllib; print(tomllib.load(open("pyproject.toml", "rb"))["project"]["version"])')"
94+
95+
smoke_dir="$(mktemp -d)"
96+
python -m venv "$smoke_dir/.venv"
97+
. "$smoke_dir/.venv/bin/activate"
98+
python -m pip install --upgrade pip
99+
100+
if [ "${{ inputs.repository }}" = "pypi" ]; then
101+
python -m pip install "calle-ai==$version"
102+
else
103+
python -m pip install \
104+
--index-url https://test.pypi.org/simple/ \
105+
--extra-index-url https://pypi.org/simple \
106+
"calle-ai==$version"
107+
fi
108+
109+
python -c 'from calle import CalleClient; print(CalleClient)'

0 commit comments

Comments
 (0)