Skip to content

Add SQLAlchemy 2.0 support (issue #49) #126

Add SQLAlchemy 2.0 support (issue #49)

Add SQLAlchemy 2.0 support (issue #49) #126

Workflow file for this run

name: Tests Pipeline
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
flake8_py3:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.11
uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install flake8 pytest
- name: Run flake8
run: |
flake8 omymodels/ --count --show-source --statistics
tests:
runs-on: ubuntu-latest
needs: [flake8_py3]
strategy:
matrix:
python: ['3.9', '3.10', '3.11', '3.12', '3.13']
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install poetry
poetry install
env:
POETRY_VIRTUALENVS_CREATE: false
- name: Test with pytest and coverage
run: |
pytest tests/ -vv --cov=omymodels --cov-report=term-missing --cov-report=xml
- name: Upload coverage to Codecov
if: matrix.python == '3.11'
uses: codecov/codecov-action@v4
with:
files: ./coverage.xml
fail_ci_if_error: false
verbose: true
deploy-pages:
runs-on: ubuntu-latest
needs: [tests]
if: github.ref == 'refs/heads/main' && github.event_name == 'push'
permissions:
contents: read
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- uses: actions/checkout@v4
- name: Setup Pages
uses: actions/configure-pages@v4
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: './docs'
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4