Skip to content

Commit

Permalink
Move all Tox env configuration and version compatibility into tox.ini
Browse files Browse the repository at this point in the history
  • Loading branch information
phillipuniverse committed Jan 21, 2024
1 parent debf911 commit a0dea62
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 31 deletions.
41 changes: 10 additions & 31 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,40 +30,19 @@ jobs:


strategy:
fail-fast: false
matrix:
include:
# sqlalchemylatest (i.e. > 2.0.0) is not yet supported
# for any version of python

- {python: '3.7', tox: "py37-sqlalchemy1.0"}
- {python: '3.7', tox: "py37-sqlalchemy1.1"}
- {python: '3.7', tox: "py37-sqlalchemy1.2"}
- {python: '3.7', tox: "py37-sqlalchemy1.3"}
- {python: '3.7', tox: "py37-sqlalchemy1.4"}

- {python: '3.8', tox: "py38-sqlalchemy1.0"}
- {python: '3.8', tox: "py38-sqlalchemy1.1"}
- {python: '3.8', tox: "py38-sqlalchemy1.2"}
- {python: '3.8', tox: "py38-sqlalchemy1.3"}
- {python: '3.8', tox: "py38-sqlalchemy1.4"}

- {python: '3.9', tox: "py39-sqlalchemy1.0"}
- {python: '3.9', tox: "py39-sqlalchemy1.1"}
- {python: '3.9', tox: "py39-sqlalchemy1.2"}
- {python: '3.9', tox: "py39-sqlalchemy1.3"}
- {python: '3.9', tox: "py39-sqlalchemy1.4"}

# python3.10 with sqlalchemy <= 1.1 errors with:
# AttributeError: module 'collections' has no attribute 'MutableMapping'
- {python: '3.10', tox: "py310-sqlalchemy1.2"}
- {python: '3.10', tox: "py310-sqlalchemy1.3"}
- {python: '3.10', tox: "py310-sqlalchemy1.4"}
python: ['3.7', '3.8', '3.9', '3.10']

steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v4
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install tox tox-gh-actions
- name: Test with tox
run: tox

- run: tox -e ${{ matrix.tox }}
9 changes: 9 additions & 0 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,15 @@
envlist = {py37,py38,py39}-sqlalchemy{1.0,1.1,1.2,1.3,1.4,2,latest},{py310,py311,py312}-sqlalchemy{1.2,1.3,1.4,2,latest}
skipsdist = True

[gh-actions]
python =
3.7: py37
3.8: py38
3.9: py39
3.10: py310
3.11: py311
3.12: py312

[testenv]
whitelist_externals = make
usedevelop = true
Expand Down

0 comments on commit a0dea62

Please sign in to comment.