Skip to content

use SQLModel's AsyncSession when available, fallback to SQLAlchemy's #168

use SQLModel's AsyncSession when available, fallback to SQLAlchemy's

use SQLModel's AsyncSession when available, fallback to SQLAlchemy's #168

Workflow file for this run

name: ci
on:
pull_request:
branches:
- main
push:
branches:
- main
jobs:
test:
name: test
runs-on: ${{ matrix.os }}
strategy:
matrix:
build: [linux_3.12, windows_3.12, mac_3.12]
include:
- build: linux_3.12
os: ubuntu-latest
python: 3.12
- build: windows_3.12
os: windows-latest
python: 3.12
- build: mac_3.12
os: macos-latest
python: 3.12
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip wheel
pip install -r requirements.txt
# test all the builds apart from linux_3.12...
- name: Test with pytest
if: matrix.build != 'linux_3.12'
run: pytest
# only do the test coverage for linux_3.12
- name: Produce coverage report
if: matrix.build == 'linux_3.12'
run: pytest --cov=fastapi_async_sqlalchemy --cov-report=xml
- name: Upload coverage report
if: matrix.build == 'linux_3.12'
uses: codecov/codecov-action@v4
with:
file: ./coverage.xml
token: ${{ secrets.CODECOV_TOKEN }}
ruff:
name: ruff
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: 3.12
- name: Install dependencies
run: pip install ruff
- name: Run ruff linter
run: ruff check .
- name: Run ruff formatter
run: ruff format --check .