# ───────────────────────────────────────────────────────────────────────────── # .cqa-runner.conf — DEV Ground Rule runner config (stack: python / Flask) # # Sourced by qa-unit-test-run.sh and qa-api-e2e-run.sh. Plain shell assignments. # Every command runs from the repo root. Leave a value empty to disable a step. # ───────────────────────────────────────────────────────────────────────────── # ── Coverage output dir (created if missing) ──────────────────────────────── OUT_DIR="qa-coverage" # ── Unit tests ────────────────────────────────────────────────────────────── UNIT_TEST_CMD='pytest -m "not e2e" --ignore=tests/e2e' COVERAGE_CMD='coverage run -m pytest -m "not e2e" --ignore=tests/e2e && coverage json -o ${OUT_DIR}/coverage.json' COVERAGE_FILE='${OUT_DIR}/coverage.json' COVERAGE_FORMAT='json' COVERAGE_JSON_KEY='totals.percent_covered' # Line-coverage quality gate (DEV Ground Rule Precondition.1 → 80). GATE_LINE='80' # ── Format / lint (used by the pre-commit hook) ───────────────────────────── FORMAT_CMD='ruff format {FILES}' FORMAT_CHECK_CMD='ruff format --check {FILES}' LINT_CMD='ruff check --fix {FILES}' STAGED_GLOB="'*.py'" # ── API E2E ────────────────────────────────────────────────────────────────── E2E_TEST_CMD='pytest tests/e2e -m e2e -v' DEFAULT_BASE_URL="http://localhost:8000" HEALTH_PATH="/monitor/l7check" # qa-api-e2e-run.sh starts this itself when nothing is listening, and tears it # down on exit (use --no-start to require a pre-running server, --keep-server to # leave it up). START_CMD="CQA_TEST_APP_HTTP_PORT=8000 python3 run_cqa_test_app.py" # Per-attempt health-check timeout. Must exceed the slowest single response; # the app's first request can take ~5s (server hostname/IP lookup), so keep ≥10. HEALTH_TIMEOUT="10" # Max seconds to wait for an auto-started server to report healthy. START_WAIT="60" API_COVERAGE_FILE='${OUT_DIR}/api_coverage.json' # ── Install hint printed to the user (not executed) ───────────────────────── INSTALL_HINT='pip install -r requirements-test.txt'