-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
SQLAlchemy 2.0 Support with 3.9/3.10/3.11 tests by NOX
* Simplified pyproject.toml * Implement Nox and tests for 3.9 / 3.10 / 3.11 in both SQLA 1.4 and 2.0 * Implement multiple version testing in Github Actions using the matrix strategy.
- Loading branch information
Showing
14 changed files
with
784 additions
and
1,553 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
[bumpversion] | ||
current_version = 0.7.2 | ||
current_version = 0.8.0 | ||
commit = True | ||
tag = False | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
.pytest_cache | ||
.tox | ||
.nox | ||
dist |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
name: Multiple Python Tests | ||
|
||
on: | ||
push: | ||
branches: [ main ] | ||
pull_request: | ||
branches: [ main, "*" ] | ||
workflow_dispatch: | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-20.04 | ||
strategy: | ||
matrix: | ||
python-version: [ "3.9", "3.10", "3.11" ] | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
- name: Install dependencies | ||
run: | | ||
python -m pip install poetry | ||
poetry install | ||
- name: Run Tests | ||
run: | | ||
poetry run nox -p ${{ matrix.python-version }} | ||
- name: Show Test Logs if tests failed | ||
if: ${{ failure() }} | ||
run: docker compose logs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,3 @@ | ||
3.10.1 | ||
3.9 | ||
3.10 | ||
3.11 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import nox | ||
|
||
|
||
@nox.session(python=("3.9", "3.10", "3.11")) | ||
@nox.parametrize("sqla_version", ["2.0.16", "1.4.48"]) | ||
def tests(session, sqla_version): | ||
session.install(f'SQLAlchemy=={sqla_version}') | ||
session.install('pytest') | ||
session.install('snapshottest') | ||
session.run('pytest') |
Oops, something went wrong.