File tree Expand file tree Collapse file tree 6 files changed +89
-765
lines changed
Expand file tree Collapse file tree 6 files changed +89
-765
lines changed Original file line number Diff line number Diff 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 }}
Original file line number Diff line number Diff line change 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+ "
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments