diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index ed93f20..a97673a 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -4,4 +4,13 @@ repos: hooks: - id: ruff args: [--fix, --exit-non-zero-on-fix] - - id: ruff-format \ No newline at end of file + - id: ruff-format + +- repo: local + hooks: + - id: pytest-check + name: pytest-check + entry: pytest + language: system + pass_filenames: false + always_run: true \ No newline at end of file diff --git a/.vscode/settings.json b/.vscode/settings.json index e254150..7609979 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -9,6 +9,7 @@ "altinstall", "asyncio", "autoflush", + "autoupdate", "autouse", "awscliv", "boto", diff --git a/pyproject.toml b/pyproject.toml index 817ff43..8a78bfe 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -24,4 +24,8 @@ ignore = [] known-first-party = ["app"] [tool.ruff.format] -docstring-code-format = true \ No newline at end of file +docstring-code-format = true + +[tool.pytest.ini_options] +addopts = "--cov=app --cov-report=term-missing --cov-fail-under=70" +testpaths = ["tests"] \ No newline at end of file diff --git a/scripts/install.sh b/scripts/install.sh index 0166078..2cbcb7e 100755 --- a/scripts/install.sh +++ b/scripts/install.sh @@ -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