-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Address compatibilities with sqlalchemy 2. (#176)
- Loading branch information
Showing
10 changed files
with
143 additions
and
186 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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,36 @@ | ||
name: Github Release/Publish PyPi | ||
|
||
on: | ||
push: | ||
tags: | ||
- "v*.*.*" | ||
|
||
jobs: | ||
gh-release: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v1 | ||
- name: Release | ||
uses: softprops/action-gh-release@v1 | ||
with: | ||
generate_release_notes: true | ||
|
||
publish-pypi: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-python@v4 | ||
with: | ||
python-version: "3.9" | ||
- name: Run image | ||
uses: abatilo/actions-poetry@v2.0.0 | ||
with: | ||
poetry-version: 1.2.0 | ||
|
||
- name: Publish | ||
env: | ||
PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }} | ||
run: | | ||
poetry config pypi-token.pypi $PYPI_TOKEN | ||
poetry publish --build |
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,92 @@ | ||
name: Test | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- main | ||
push: | ||
branches: | ||
- main | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
# Test our minimum version bound, the highest version available, | ||
# and something in the middle (i.e. what gets run locally). | ||
python-version: ["3.7", "3.9", "3.11"] | ||
pytest-asyncio-version: ["0.16.0", "0.19.0"] | ||
sqlalchemy-version: ["1.3.0", "1.4.0", "2.0.0b4"] | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Set up Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
architecture: x64 | ||
|
||
- name: Install poetry | ||
uses: abatilo/actions-poetry@v2.0.0 | ||
with: | ||
poetry-version: 1.2.0 | ||
|
||
- name: Set up cache | ||
uses: actions/cache@v3 | ||
with: | ||
path: ~/.cache/pypoetry/virtualenvs | ||
key: venv-${{ runner.os }}-${{ matrix.python-version }}-${{ hashFiles('**/poetry.lock') }} | ||
restore-keys: | | ||
${{ runner.os }}-poetry- | ||
- name: Install base dependencies | ||
run: poetry run make install-base | ||
|
||
- name: Install specific sqlalchemy version | ||
run: | | ||
poetry run pip install 'sqlalchemy~=${{ matrix.sqlalchemy-version }}' | ||
- name: Install specific pytest-asyncio version | ||
run: pip install 'pytest-asyncio~=${{ matrix.pytest-asyncio-version }}' | ||
|
||
- if: ${{ matrix.python-version == '3.9' && matrix.sqlalchemy-version == '1.4.0' }} | ||
run: poetry run make lint | ||
|
||
- run: poetry run make test-base | ||
|
||
- name: Install dependencies | ||
run: poetry run make install | ||
|
||
- run: poetry run make test | ||
|
||
- name: Store test result artifacts | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
path: coverage.xml | ||
|
||
- name: Coveralls | ||
env: | ||
COVERALLS_FLAG_NAME: run-${{ inputs.working-directory }} | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
COVERALLS_PARALLEL: true | ||
run: | | ||
pip install tomli coveralls | ||
coveralls --service=github | ||
finish: | ||
needs: | ||
- test | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Coveralls Finished | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
run: | | ||
pip install tomli coveralls | ||
coveralls --service=github --finish |
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
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
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