add coverage

This commit is contained in:
Jakub Miazek 2022-11-04 10:19:49 +01:00
parent 95ef4e5a82
commit 30836b15bc
3 changed files with 5 additions and 10 deletions

View File

@ -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

View File

@ -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):
"""

View File

@ -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):
"""