Skip to content

Commit

Permalink
Update PyPi release workflow with environment and dependency changes 🔄
Browse files Browse the repository at this point in the history
This commit introduces several changes to the PyPi release workflow. We've added the OPENAI_API_KEY to the environment variables and updated the Python package caching strategy. The dependencies installation process has been refined, with requirements now being fetched from a dedicated test requirements file. Additionally, the testing step has been updated to use a new pytest recording mode. These changes aim to streamline the release process and improve testing reliability.
  • Loading branch information
TechNickAI committed Jul 22, 2023
1 parent e9c7b82 commit f44b4f6
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions .github/workflows/pypi_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ jobs:
test:
runs-on: ubuntu-latest
name: Test with Python ${{ matrix.python-version }}
env:
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}

strategy:
matrix:
Expand All @@ -27,22 +29,24 @@ jobs:
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
cache: pip

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements/requirements.txt
pip install wheel twine pytest
pip install -r requirements/requirements-test.txt
# Additional build dependencies
pip install wheel twine
- name: Build and install aicodebot
run: |
python setup.py sdist bdist_wheel
pip install dist/*.whl
- name: Smoke Test
- name: Test
run: |
aicodebot -V
pytest
pytest --record-mode=new_episodes
pypi_release:
needs: test
Expand Down

0 comments on commit f44b4f6

Please sign in to comment.