Skip to content

Commit aaa9fd3

Browse files
authored
Merge pull request #21 from contextforge-org/FixCI-20
Fix ci 20
2 parents 7200468 + aece488 commit aaa9fd3

3 files changed

Lines changed: 7 additions & 8 deletions

File tree

.github/workflows/test.yml

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,4 @@ jobs:
2727
python -m pip install --upgrade pip
2828
python -m pip install -e ".[dev]"
2929
- name: Build and test
30-
# TEMPORARY: There are bugs in the upstream that cause the tests to fail
31-
# so for now, this step will always succeed. This should be removed
32-
# as soon as the tests can pass against a stable version of the
33-
# upstream!
34-
# run: pytest
35-
run: pytest || true
30+
run: pytest

pyproject.toml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -342,7 +342,7 @@ plugins = ["pydantic.mypy"] # Enable mypy plugin for Pydantic model
342342

343343
[tool.pytest.ini_options]
344344
minversion = "6.0"
345-
addopts = "-ra --cov=cforge --cov-report=html:htmlcov --cov-report=term"
345+
addopts = "-ra --cov=cforge --cov-report=html:htmlcov --cov-report=term --cov-fail-under=100"
346346
testpaths = [ "tests",]
347347
filterwarnings = [
348348
"error", # Turn ALL warnings into errors by default
@@ -353,6 +353,10 @@ filterwarnings = [
353353
"ignore: `regex` has been deprecated, please use `pattern` instead", # FastAPI upgraded needed upstream
354354
"ignore: Extra environment options are deprecated. Use a preconfigured jinja2.Environment instead.", # Jinja2 deprecation upstream
355355
"ignore:websockets.*is deprecated.*:DeprecationWarning", # websockets library upgrade needed upstream
356+
"ignore:The argument signature for the.*PoolEvents.reset:sqlalchemy.exc.SADeprecationWarning", # sqlalchemy deprecation, fixed upstream in mcpgateway
357+
"ignore: The HMAC key is 11 bytes long.*", # security warning from jwt
358+
"ignore:unclosed database in.*:ResourceWarning", # sqlite3 connection leaked during mcpgateway import-time bootstrap
359+
"ignore:Exception ignored in.*sqlite3.Connection.*:pytest.PytestUnraisableExceptionWarning", # same root cause as above
356360
]
357361

358362
# ── fawltydeps ─────────────────────────────────────────────────────

tests/conftest.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,7 @@ def authorized_mock_client(mock_client) -> Generator[None, None, None]:
280280
yield mock_client
281281

282282

283-
@pytest.fixture
283+
@pytest.fixture(autouse=True)
284284
def mock_settings() -> Generator[CLISettings, None, None]:
285285
"""Provide a context manager for mocking settings."""
286286
with tempfile.TemporaryDirectory(prefix="cforge_") as tmpdir:

0 commit comments

Comments
 (0)