Skip to content

Commit cef50d9

Browse files
committed
Migrate package metadata to pyproject.toml, remove setup.py
1 parent 4ce9153 commit cef50d9

File tree

6 files changed

+89
-765
lines changed

6 files changed

+89
-765
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,10 @@ jobs:
3333
- name: Run tests
3434
run: pytest -k "not example"
3535
env:
36-
API_KEY: ${{secrets.API_KEY}}
36+
API_KEY: ${{ secrets.API_KEY }}
3737

3838
- name: Run example tests
3939
if: matrix.python-version == '3.13'
4040
run: pytest -k "example"
4141
env:
42-
API_KEY: ${{secrets.API_KEY}}
42+
API_KEY: ${{ secrets.API_KEY }}

.github/workflows/release.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,3 +91,36 @@ jobs:
9191
TWINE_USERNAME: ${{ github.repository_owner }}
9292
TWINE_PASSWORD: ${{ secrets.GITHUB_TOKEN }}
9393
run: twine upload --repository-url https://pypi.pkg.github.com/${{ github.repository_owner }} dist/*
94+
95+
smoke-test:
96+
name: Smoke test published package
97+
needs: [publish]
98+
runs-on: ubuntu-latest
99+
steps:
100+
- name: Wait for PyPI availability
101+
run: |
102+
VERSION=${GITHUB_REF_NAME#v}
103+
echo "Waiting for serpapi==$VERSION on PyPI..."
104+
for i in $(seq 1 12); do
105+
if pip index versions serpapi 2>/dev/null | grep -q "$VERSION"; then
106+
echo "Available!"
107+
exit 0
108+
fi
109+
echo "Attempt $i/12 — sleeping 10s..."
110+
sleep 10
111+
done
112+
echo "Timed out waiting for PyPI propagation" && exit 1
113+
114+
- name: Install from PyPI
115+
run: |
116+
VERSION=${GITHUB_REF_NAME#v}
117+
pip install "serpapi==$VERSION"
118+
119+
- name: Verify import and version
120+
run: |
121+
VERSION=${GITHUB_REF_NAME#v}
122+
python -c "
123+
import serpapi
124+
assert serpapi.__version__ == '$VERSION', f'Version mismatch: {serpapi.__version__} != $VERSION'
125+
print(f'OK: serpapi=={serpapi.__version__} installed successfully')
126+
"

Pipfile

Lines changed: 0 additions & 14 deletions
This file was deleted.

0 commit comments

Comments
 (0)