Skip to content

add test

add test #111

Workflow file for this run

name: pytest
on:
push:
branches:
- master
- develop
pull_request:
branches:
- master
- develop
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.9", "3.11", "3.13"]
sqlalchemy-version: ["1.4"]
include:
- sqlalchemy-version: "1.4"
sqlalchemy-lt-version: "2.0"
flask-sqlalchemy-version: "3.0"
flask-sqlalchemy-lt-version: "4.0"
flask-version: "3.0"
flask-lt-version: "4.0"
name: Python ${{ matrix.python-version }} - SQLAlchemy ${{ matrix.sqlalchemy-version }}
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install -e .[tests] pytest-cov \
"sqlalchemy>=${{ matrix.sqlalchemy-version }},<${{ matrix.sqlalchemy-lt-version }}" \
"flask-sqlalchemy>=${{ matrix.flask-sqlalchemy-version }},<${{ matrix.flask-sqlalchemy-lt-version }}" \
"flask>=${{ matrix.flask-version }},<${{ matrix.flask-lt-version }}"
- name: Test with pytest
run: |
pytest -v --cov --cov-report xml
- name: Upload coverage to Codecov
if: ${{ matrix.python-version == '3.11' && matrix.sqlalchemy-version == '1.4'}}
uses: codecov/codecov-action@v3
with:
flags: pytest