Skip to content

Commit

Permalink
Merge pull request #1182 from gpt-engineer-org/fix-tox-python311
Browse files Browse the repository at this point in the history
fixing tox Python 3.11 and 3.12 issues
  • Loading branch information
captivus authored Jul 7, 2024
2 parents 6fbc9a5 + d068b0c commit 3bb4a49
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 15 deletions.
26 changes: 16 additions & 10 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,34 +10,40 @@ on:
branches: [ main ]

concurrency:
group: ${{github.workflow}} - ${{github.ref}}
group: ${{ github.workflow }} - ${{ github.ref }}
cancel-in-progress: true

jobs:
test:
permissions: {}
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.10', '3.11', '3.12']

steps:
- uses: actions/checkout@v3
- name: Checkout repository
uses: actions/checkout@v3

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
cache: 'pip' #Note that pip is for the tox level. Poetry is still used for installing the specific environments (tox.ini)
python-version: ${{ matrix.python-version == '3.12' && '3.12.3' || matrix.python-version }} # Using 3.12.3 to resolve Pydantic ForwardRef issue
cache: 'pip' # Note that pip is for the tox level. Poetry is still used for installing the specific environments (tox.ini)

- name: Install tox
run: pip install tox==4.15.0
- name: Check Python Version
run: python --version

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install tox==4.15.0 poetry
- name: Run tox
env:
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
run: tox

- name: Report coverage
run: |
bash <(curl -s https://codecov.io/bash)
# Temporarily disabling codecov until we resolve codecov rate limiting issue
# - name: Report coverage
# run: |
# bash <(curl -s https://codecov.io/bash)
11 changes: 6 additions & 5 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
[tox]
envlist = py310, py311, py312
isolated_build = True

[testenv]
basepython =
py310: python3.10
py311: python3.11
py312: python3.12
deps =
poetry
commands =
poetry install
poetry run pytest --cov=gpt_engineer --cov-report=xml -k "not installed_main_execution"
passenv =
OPENAI_API_KEY
poetry install --no-root
poetry run pytest --cov=gpt_engineer --cov-report=xml -k 'not installed_main_execution'

0 comments on commit 3bb4a49

Please sign in to comment.