Skip to content
This repository was archived by the owner on Mar 9, 2026. It is now read-only.

Commit dfe6b5a

Browse files
committed
Refactor PyPi release workflow and add smoke tests 🔄🧪
This commit refactors the PyPi release workflow in `.github/workflows/pypi_release.yml`. The `pypi_release` job has been simplified and a new `smoke_test` job has been added. The smoke test runs on multiple Python versions (3.7 to 3.11) and includes a pytest run. This ensures our package is robust across different Python environments before it's published to PyPi. 🚀
1 parent 8bcf8c1 commit dfe6b5a

File tree

1 file changed

+21
-10
lines changed

1 file changed

+21
-10
lines changed

.github/workflows/pypi_release.yml

Lines changed: 21 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -9,27 +9,29 @@ on:
99
- 'v*'
1010

1111
jobs:
12-
pypi_release:
12+
smoke_test:
1313
runs-on: ubuntu-latest
14-
permissions:
15-
# Required for github actions to create a release
16-
contents: write
17-
steps:
14+
name: Smoke Test for python
1815

19-
- name: Checkout Code
20-
uses: actions/checkout@v3
16+
strategy:
17+
matrix:
18+
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
2119

22-
- name: Setup Python
20+
steps:
21+
- name: Setup Python ${{ matrix.python-version }}
2322
uses: actions/setup-python@v4
2423
with:
25-
python-version: "3.11"
24+
python-version: ${{ matrix.python-version }}
2625
cache: pip
2726

27+
- name: Checkout Code
28+
uses: actions/checkout@v3
29+
2830
- name: Install dependencies
2931
run: |
3032
python -m pip install --upgrade pip
3133
pip install -r requirements/requirements.txt
32-
pip install wheel twine
34+
pip install wheel twine pytest
3335
3436
- name: Build the package
3537
run: |
@@ -39,7 +41,16 @@ jobs:
3941
run: |
4042
pip install dist/*.whl
4143
aicodebot -V
44+
pytest
4245
46+
pypi_release:
47+
runs-on: ubuntu-latest
48+
name: Publish to PyPi
49+
permissions:
50+
# Required for github actions to create a release
51+
contents: write
52+
53+
steps:
4354
- name: Publish to PyPi
4455
env:
4556
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}

0 commit comments

Comments
 (0)