mirror of
https://github.com/grillazz/fastapi-sqlalchemy-asyncpg.git
synced 2025-08-26 16:40:40 +03:00
add coverage
This commit is contained in:
parent
95ef4e5a82
commit
30836b15bc
6
.github/workflows/build-and-test.yml
vendored
6
.github/workflows/build-and-test.yml
vendored
@ -44,7 +44,11 @@ jobs:
|
||||
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
|
||||
run: poetry install --no-interaction --no-root
|
||||
- name: Test with Coverage
|
||||
run: poetry run pytest
|
||||
run: poetry run pytest --cov=. --cov-report=xml
|
||||
- uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: coverage-xml
|
||||
path: coverage.xml
|
||||
env:
|
||||
PYTHONDONTWRITEBYTECODE: 1
|
||||
PYTHONUNBUFFERED: 1
|
||||
|
@ -17,11 +17,6 @@ class Nonsense(Base):
|
||||
name = Column(String, nullable=False, primary_key=True, unique=True)
|
||||
description = Column(String, nullable=False)
|
||||
|
||||
def __init__(self, name: str, description: str):
|
||||
self.name = name
|
||||
self.description = description
|
||||
|
||||
|
||||
@classmethod
|
||||
async def find(cls, db_session: AsyncSession, name: str):
|
||||
"""
|
||||
|
@ -17,10 +17,6 @@ class Stuff(Base):
|
||||
name = Column(String, nullable=False, primary_key=True, unique=True)
|
||||
description = Column(String, nullable=False)
|
||||
|
||||
def __init__(self, name: str, description: str):
|
||||
self.name = name
|
||||
self.description = description
|
||||
|
||||
@classmethod
|
||||
async def find(cls, db_session: AsyncSession, name: str):
|
||||
"""
|
||||
|
Loading…
x
Reference in New Issue
Block a user