Skip to content

fix: support relationships as string (#29) #75

fix: support relationships as string (#29)

fix: support relationships as string (#29) #75

Workflow file for this run

name: "Test"
on:
pull_request:
types:
- "opened"
- "synchronize"
- "reopened"
push:
branches:
- '*'
workflow_dispatch:
jobs:
test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
sqlalchemy-version: ["1.4.52", "2.0.31"]
pydantic-version: ["1.9.0", "2.8.2"]
services:
postgres:
image: postgres:latest
env:
POSTGRES_PASSWORD: postgres
ports:
- 5432:5432
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
id: setup-python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: cache poetry install
uses: actions/cache@v4
with:
path: ~/.local
key: poetry-${{ steps.setup-python.outputs.python-version }}-1.7.1-0
- uses: snok/install-poetry@v1
with:
version: 1.7.1
virtualenvs-create: true
virtualenvs-in-project: true
- name: Load cached venv
id: cached-poetry-dependencies
uses: actions/cache@v4
with:
path: .venv
key: venv-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/poetry.lock') }}-0
- name: Install dependencies
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
run: poetry install --no-interaction
- name: Install sqlalchemy ${{ matrix.sqlalchemy-version }}
run: poetry add sqlalchemy==${{ matrix.sqlalchemy-version }}
- name: Install pydantic ${{ matrix.pydantic-version }}
run: poetry add pydantic==${{ matrix.pydantic-version }}
- name: Run tests
run: poetry run pytest --cov-report=xml
env:
POSTGRES_PASSWORD: postgres