Align CI and Poe test lanes with runtime compose flows
Some checks failed
CICD / Build and Publish CICD Base Image (push) Successful in 23s
CICD / Build and Push CICD Image (push) Failing after 13m16s
CICD / Backend Tests (push) Has been cancelled
CICD / Pre-commit Checks (push) Has been cancelled
CICD / Frontend Tests (push) Has been cancelled
CICD / Backend Doctests (push) Has been cancelled
CICD / Build and Publish Runtime Images (push) Has been cancelled
CICD / Runtime Black-Box Integration Tests (push) Has been cancelled
CICD / End-to-End Tests (push) Has been cancelled

This commit is contained in:
copilotcoder
2026-07-06 16:51:39 -04:00
parent 0791f9257e
commit 4af111fcdb
8 changed files with 142 additions and 10 deletions

View File

@@ -166,15 +166,15 @@ setup = [
]
test-all = ["test-backend", "test-frontend", "test-integration"]
# === Testing Tasks ===
test-backend = {shell = "cd backend && uv run pytest", help = "Run backend unit tests"}
test-backend-cov = {shell = "cd backend && uv run pytest --cov", help = "Run backend tests with coverage"}
test-e2e = {shell = "cd frontend && yarn test:e2e", help = "Run end-to-end tests"}
test-backend = {shell = "cd backend && uv run pytest -m 'not integration'", help = "Run backend unit tests (excludes integration marker)"}
test-backend-cov = {shell = "cd backend && uv run pytest -m 'not integration' --cov", help = "Run backend unit tests with coverage (excludes integration marker)"}
test-e2e = {shell = "bash ./scripts/run-ci-e2e-compose.sh", help = "Run E2E tests via compose against deployable runtime images"}
test-frontend = {shell = "cd frontend && yarn test", help = "Run frontend unit tests"}
test-frontend-cov = {shell = "cd frontend && yarn test:coverage", help = "Run frontend tests with coverage"}
test-full = ["test-backend-cov", "test-frontend-cov", "test-integration", "test-e2e"]
# === Smart Conditional Tasks ===
test-if-changed = {shell = "if git diff --quiet HEAD~1 backend/ frontend/; then echo 'No changes detected, skipping tests'; else poe test-unit; fi", help = "Only run tests if code has changed"}
test-integration = {shell = "cd backend && uv run pytest tests/integration/", help = "Run backend integration tests"}
test-integration = {shell = "bash ./scripts/run-ci-integration-compose.sh", help = "Run integration tests via compose against deployable runtime image"}
test-parallel = {shell = "poe test-backend & poe test-frontend & wait", help = "Run unit tests in parallel for speed"}
# === Comprehensive Testing ===
test-unit = ["test-backend", "test-frontend"]

View File

@@ -14,7 +14,6 @@ from backend.main import app, compatibility_status, get_api_session
client = TestClient(app)
@pytest.mark.integration
class TestAPIIntegration:
"""Integration tests for API endpoints."""

View File

@@ -12,6 +12,7 @@ import pytest
BACKEND_BASE_URL = os.getenv("INTEGRATION_BACKEND_URL", "http://backend:8000").rstrip(
"/"
)
pytestmark = pytest.mark.integration
def _fetch(path: str) -> tuple[int, str]:
@@ -27,7 +28,6 @@ def _fetch(path: str) -> tuple[int, str]:
return exc.code, body
@pytest.mark.integration
def test_root_endpoint_runtime() -> None:
"""Runtime root endpoint should return backend API message."""
status, body = _fetch("/")
@@ -36,7 +36,6 @@ def test_root_endpoint_runtime() -> None:
assert payload == {"message": "Plex Playlist Backend API"}
@pytest.mark.integration
def test_health_endpoint_runtime() -> None:
"""Runtime health endpoint should report healthy database connectivity."""
status, body = _fetch("/health")
@@ -46,7 +45,6 @@ def test_health_endpoint_runtime() -> None:
assert payload.get("database") == "connected"
@pytest.mark.integration
def test_compatibility_endpoint_runtime() -> None:
"""Runtime compatibility endpoint should report policy check success."""
status, body = _fetch("/compatibility")