Skip to content
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

testing all python versions with tox #956

Merged
merged 6 commits into from
Jan 5, 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
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
Loading