Skip to content

Commit 676a2eb

Browse files
committed
add pytest dependency
psycopg2-binary is required by create_engine for postgresql database in setting up the tests
1 parent b05f38a commit 676a2eb

File tree

3 files changed

+29
-9
lines changed

3 files changed

+29
-9
lines changed

.github/workflows/app-tests.yaml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,13 @@ on:
55
branches: [ main ]
66
pull_request:
77
branches: [ main ]
8+
workflow_dispatch:
9+
10+
permissions:
11+
contents: read
812

913
jobs:
10-
test_package:
14+
test-package:
1115
name: Test ${{ matrix.os }} Python ${{ matrix.python_version }}
1216
runs-on: ${{ matrix.os }}
1317
strategy:
@@ -65,4 +69,6 @@ jobs:
6569
run: |
6670
cd ./src/frontend
6771
npm install
68-
npm run build
72+
npm run build
73+
- name: Run Pytest
74+
run: python3 -m pytest

pyproject.toml

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,20 @@
11
[tool.ruff]
22
line-length = 120
3-
target-version = "py311"
3+
target-version = "py312"
4+
lint.select = ["E", "F", "I", "UP"]
5+
lint.ignore = ["D203"]
6+
lint.isort.known-first-party = ["fastapi_app"]
47

5-
[tool.ruff.lint]
6-
select = ["E", "F", "I", "UP"]
7-
ignore = ["D203"]
8+
[tool.mypy]
9+
check_untyped_defs = true
10+
python_version = 3.12
11+
exclude = [".venv/*"]
812

9-
[tool.ruff.lint.isort]
10-
known-first-party = ["fastapi_app"]
13+
[tool.pytest.ini_options]
14+
addopts = "-ra --cov"
15+
testpaths = ["tests"]
16+
pythonpath = ['src']
17+
filterwarnings = ["ignore::DeprecationWarning"]
18+
19+
[tool.coverage.report]
20+
show_missing = true

requirements-dev.txt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,8 @@
22
ruff
33
pre-commit
44
pip-tools
5-
pip-compile-cross-platform
5+
pip-compile-cross-platform
6+
pytest
7+
pytest-cov
8+
pytest-asyncio
9+
psycopg2-binary

0 commit comments

Comments
 (0)