Skip to content

fixing tox Python 3.11 and 3.12 issues #1182

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Jul 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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'
Loading