Run unit test upon committing new code
All checks were successful
AWS Deploy on Push / build (push) Successful in 1m3s

This commit is contained in:
2025-05-28 23:41:12 -05:00
parent 95bf0f9701
commit e25f8c1ecd
4 changed files with 20 additions and 2 deletions

View File

@@ -4,4 +4,13 @@ repos:
hooks: hooks:
- id: ruff - id: ruff
args: [--fix, --exit-non-zero-on-fix] args: [--fix, --exit-non-zero-on-fix]
- id: ruff-format - id: ruff-format
- repo: local
hooks:
- id: pytest-check
name: pytest-check
entry: pytest
language: system
pass_filenames: false
always_run: true

View File

@@ -9,6 +9,7 @@
"altinstall", "altinstall",
"asyncio", "asyncio",
"autoflush", "autoflush",
"autoupdate",
"autouse", "autouse",
"awscliv", "awscliv",
"boto", "boto",

View File

@@ -24,4 +24,8 @@ ignore = []
known-first-party = ["app"] known-first-party = ["app"]
[tool.ruff.format] [tool.ruff.format]
docstring-code-format = true docstring-code-format = true
[tool.pytest.ini_options]
addopts = "--cov=app --cov-report=term-missing --cov-fail-under=70"
testpaths = ["tests"]

View File

@@ -7,6 +7,10 @@ python3 -m pip install -r requirements.txt
# Install and configure pre-commit hooks # Install and configure pre-commit hooks
pre-commit install pre-commit install
pre-commit install-hooks pre-commit install-hooks
pre-commit autoupdate
# Verify pytest setup
python3 -m pytest
# Initialize and run database migrations # Initialize and run database migrations
alembic upgrade head alembic upgrade head