many-repos/noxfile.py

32 lines
660 B
Python
Raw Normal View History

2024-05-27 13:29:04 +02:00
from nox_poetry import session
@session(python=["3.11", "3.12"])
def tests(s):
"""run the tests with pytest"""
s.install('pytest')
# session.install('.')
s.run('pytest', 'tests')
2024-05-28 15:35:47 +02:00
@session(python='python3.12', name="type")
2024-05-27 13:29:04 +02:00
def _type(s):
"""run type checks"""
s.install('mypy')
2024-05-28 15:35:47 +02:00
s.run('mypy', 'many_repos')
2024-05-27 13:29:04 +02:00
@session(python='python3.12')
def lint(s):
"""run linter"""
s.install('ruff')
s.run('ruff', 'check', 'many_repos', 'tests')
@session(python='python3.12')
def coverage(s):
"""run coverage report"""
s.install('pytest', 'pytest-cov')
s.install('.')
s.run('pytest', '--cov=many_repos', 'tests/')