Skip to content

Commit 54ab93a

Browse files
committed
CHORE: Adds test coverage reports
1 parent c44d4a3 commit 54ab93a

File tree

33 files changed

+1132
-1
lines changed

33 files changed

+1132
-1
lines changed

.DS_Store

6 KB
Binary file not shown.

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,5 @@ venv.bak/
1212

1313
# test environments
1414
.env
15+
.coverage*
16+
htmlcov/

Makefile

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,12 +44,20 @@ lock:
4444

4545
test:
4646
uv tool run --from 'tox==4.30.2' tox -e lint
47+
find src -type d -name htmlcov -exec rm -rf {} +
48+
find src -type f -name '.coverage' -delete
4749
@for dir in $(SUBDIRS); do \
4850
if [ -f $$dir/pyproject.toml ]; then \
4951
echo "Testing $$dir"; \
50-
cd $$dir && uv run pytest && cd ../..; \
52+
cd $$dir && \
53+
COVERAGE_FILE=../../.coverage.$$(_basename=$$(basename $$dir); echo $$_basename) \
54+
uv run pytest --cov=. --cov-append --cov-report=html && \
55+
cd ../..; \
5156
fi \
5257
done
58+
uv run coverage combine
59+
uv run coverage html
60+
uv run coverage report --fail-under=72
5361

5462
format:
5563
uv tool run --from 'tox==4.30.2' tox -e format

requirements-dev.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
-r requirements.txt
22
pytest
33
pytest-asyncio
4+
pytest-cov
45
tox
56
tomlq
67
uv

src/.DS_Store

6 KB
Binary file not shown.

src/oci-api-mcp-server/pyproject.toml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,4 +35,13 @@ packages = ["oracle"]
3535
dev = [
3636
"pytest>=8.4.2",
3737
"pytest-asyncio>=1.2.0",
38+
"pytest-cov>=7.0.0",
39+
]
40+
41+
[tool.coverage.run]
42+
omit = [
43+
"**/__init__.py",
44+
"**/tests/*",
45+
"dist/*",
46+
".venv/*",
3847
]

src/oci-api-mcp-server/uv.lock

Lines changed: 77 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/oci-compute-instance-agent-mcp-server/pyproject.toml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,4 +35,13 @@ packages = ["oracle"]
3535
dev = [
3636
"pytest>=8.4.2",
3737
"pytest-asyncio>=1.2.0",
38+
"pytest-cov>=7.0.0",
39+
]
40+
41+
[tool.coverage.run]
42+
omit = [
43+
"**/__init__.py",
44+
"**/tests/*",
45+
"dist/*",
46+
".venv/*",
3847
]

src/oci-compute-instance-agent-mcp-server/uv.lock

Lines changed: 77 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/oci-compute-mcp-server/pyproject.toml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,4 +35,13 @@ packages = ["oracle"]
3535
dev = [
3636
"pytest>=8.4.2",
3737
"pytest-asyncio>=1.2.0",
38+
"pytest-cov>=7.0.0",
39+
]
40+
41+
[tool.coverage.run]
42+
omit = [
43+
"**/__init__.py",
44+
"**/tests/*",
45+
"dist/*",
46+
".venv/*",
3847
]

0 commit comments

Comments
 (0)