Skip to content

Commit 3bb4a49

Browse files
authored
Merge pull request #1182 from gpt-engineer-org/fix-tox-python311
fixing tox Python 3.11 and 3.12 issues
2 parents 6fbc9a5 + d068b0c commit 3bb4a49

File tree

2 files changed

+22
-15
lines changed

2 files changed

+22
-15
lines changed

.github/workflows/ci.yaml

+16-10
Original file line numberDiff line numberDiff line change
@@ -10,34 +10,40 @@ on:
1010
branches: [ main ]
1111

1212
concurrency:
13-
group: ${{github.workflow}} - ${{github.ref}}
13+
group: ${{ github.workflow }} - ${{ github.ref }}
1414
cancel-in-progress: true
1515

1616
jobs:
1717
test:
18-
permissions: {}
1918
runs-on: ubuntu-latest
2019
strategy:
2120
matrix:
2221
python-version: ['3.10', '3.11', '3.12']
2322

2423
steps:
25-
- uses: actions/checkout@v3
24+
- name: Checkout repository
25+
uses: actions/checkout@v3
2626

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

33-
- name: Install tox
34-
run: pip install tox==4.15.0
33+
- name: Check Python Version
34+
run: python --version
35+
36+
- name: Install dependencies
37+
run: |
38+
python -m pip install --upgrade pip
39+
pip install tox==4.15.0 poetry
3540
3641
- name: Run tox
3742
env:
3843
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
3944
run: tox
4045

41-
- name: Report coverage
42-
run: |
43-
bash <(curl -s https://codecov.io/bash)
46+
# Temporarily disabling codecov until we resolve codecov rate limiting issue
47+
# - name: Report coverage
48+
# run: |
49+
# bash <(curl -s https://codecov.io/bash)

tox.ini

+6-5
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
[tox]
22
envlist = py310, py311, py312
3-
isolated_build = True
43

54
[testenv]
5+
basepython =
6+
py310: python3.10
7+
py311: python3.11
8+
py312: python3.12
69
deps =
710
poetry
811
commands =
9-
poetry install
10-
poetry run pytest --cov=gpt_engineer --cov-report=xml -k "not installed_main_execution"
11-
passenv =
12-
OPENAI_API_KEY
12+
poetry install --no-root
13+
poetry run pytest --cov=gpt_engineer --cov-report=xml -k 'not installed_main_execution'

0 commit comments

Comments
 (0)