Run unit test upon committing new code
All checks were successful
AWS Deploy on Push / build (push) Successful in 1m3s
All checks were successful
AWS Deploy on Push / build (push) Successful in 1m3s
This commit is contained in:
@@ -5,3 +5,12 @@ repos:
|
||||
- id: ruff
|
||||
args: [--fix, --exit-non-zero-on-fix]
|
||||
- id: ruff-format
|
||||
|
||||
- repo: local
|
||||
hooks:
|
||||
- id: pytest-check
|
||||
name: pytest-check
|
||||
entry: pytest
|
||||
language: system
|
||||
pass_filenames: false
|
||||
always_run: true
|
||||
1
.vscode/settings.json
vendored
1
.vscode/settings.json
vendored
@@ -9,6 +9,7 @@
|
||||
"altinstall",
|
||||
"asyncio",
|
||||
"autoflush",
|
||||
"autoupdate",
|
||||
"autouse",
|
||||
"awscliv",
|
||||
"boto",
|
||||
|
||||
@@ -25,3 +25,7 @@ known-first-party = ["app"]
|
||||
|
||||
[tool.ruff.format]
|
||||
docstring-code-format = true
|
||||
|
||||
[tool.pytest.ini_options]
|
||||
addopts = "--cov=app --cov-report=term-missing --cov-fail-under=70"
|
||||
testpaths = ["tests"]
|
||||
@@ -7,6 +7,10 @@ python3 -m pip install -r requirements.txt
|
||||
# Install and configure pre-commit hooks
|
||||
pre-commit install
|
||||
pre-commit install-hooks
|
||||
pre-commit autoupdate
|
||||
|
||||
# Verify pytest setup
|
||||
python3 -m pytest
|
||||
|
||||
# Initialize and run database migrations
|
||||
alembic upgrade head
|
||||
|
||||
Reference in New Issue
Block a user