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:
@@ -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
|
||||||
1
.vscode/settings.json
vendored
1
.vscode/settings.json
vendored
@@ -9,6 +9,7 @@
|
|||||||
"altinstall",
|
"altinstall",
|
||||||
"asyncio",
|
"asyncio",
|
||||||
"autoflush",
|
"autoflush",
|
||||||
|
"autoupdate",
|
||||||
"autouse",
|
"autouse",
|
||||||
"awscliv",
|
"awscliv",
|
||||||
"boto",
|
"boto",
|
||||||
|
|||||||
@@ -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"]
|
||||||
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user