Skip to content

Commit

Permalink
Merge pull request #956 from ATheorell/tox
Browse files Browse the repository at this point in the history
testing all python versions with tox. This is specifically to release a version tag for which we know all pythons are ok, but also for the future of course.
  • Loading branch information
ATheorell authored Jan 5, 2024
2 parents f889c78 + 57e743a commit e98d6a0
Show file tree
Hide file tree
Showing 5 changed files with 103 additions and 18 deletions.
33 changes: 18 additions & 15 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
name: Poetry install and pytest
name: Tox pytest all python versions

on:
push:
branches: [ main ]
Expand All @@ -8,22 +9,24 @@ on:
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.8', '3.9', '3.10', '3.11']

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v3

- name: Install Poetry
run: |
pipx install poetry
- 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)

- uses: actions/setup-python@v4
with:
python-version: "3.10"
cache: 'poetry'
- name: Install Tkinter
run: sudo apt-get install python3-tk

# Install dependencies using Poetry
- name: Install dependencies
run: poetry install
- name: Install tox
run: pip install tox

# Run unit tests using Poetry
- name: Run unit tests
run: poetry run pytest --cov=gpt_engineer
- name: Run tox
run: tox
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -86,3 +86,6 @@ webapp/.next/

# TODO files
/!todo*

#ignore tox files
.tox
74 changes: 71 additions & 3 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ black = "23.3.0"
mypy = "1.3.0"
ruff = ">=0.0.272"
pre-commit = "3.3.3"
tox = ">=3.0.0"

# docs
autodoc_pydantic = ">=1.8.0"
Expand Down
10 changes: 10 additions & 0 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
[tox]
envlist = py38, py39, py310, py311,
isolated_build = True

[testenv]
deps =
poetry
commands =
poetry install
poetry run pytest --cov=gpt_engineer

0 comments on commit e98d6a0

Please sign in to comment.