SQLAlchemy 2.0 compatibility #469
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
name: CI | |
on: | |
push: | |
branches: | |
- master | |
- '[0-9].[0-9]+' | |
tags: [ 'v*' ] | |
pull_request: | |
branches: | |
- master | |
- '[0-9].[0-9]+' | |
jobs: | |
test: | |
name: Test on Python ${{ matrix.python }} | |
strategy: | |
matrix: | |
python: ['3.7', '3.8', '3.9', '3.10', '3.11'] | |
fail-fast: false | |
runs-on: ubuntu-latest | |
timeout-minutes: 20 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Setup Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: ${{ matrix.python }} | |
- name: Install dependencies | |
run: | | |
pip install -e . | |
pip install -r requirements.txt | |
pip install codecov | |
- name: Run tests | |
run: | | |
make cov-ci | |
python setup.py check -rms | |
codecov | |
lint: | |
name: Run linters | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Setup Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: 3.9 | |
- name: Install dependencies | |
run: | | |
pip install -e . | |
pip install -r requirements.txt | |
- name: Run linters | |
run: | | |
make lint | |
deploy: | |
name: Deploy | |
runs-on: ubuntu-latest | |
needs: | |
- test | |
- lint | |
# Run only on pushing a tag | |
if: github.event_name == 'push' && contains(github.ref, 'refs/tags/') | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Setup Python 3.9 | |
uses: actions/setup-python@v2 | |
with: | |
python-version: 3.9 | |
- name: Install dependencies | |
run: | |
python -m pip install -U pip wheel twine | |
- name: Make dists | |
run: | |
python setup.py sdist bdist_wheel | |
- name: Check dists | |
run: | |
twine check dist/* | |
- name: PyPI upload | |
env: | |
TWINE_USERNAME: __token__ | |
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }} | |
run: | | |
twine upload dist/* |