From 5e811e6744f151ade5baee4e5998b51284c01304 Mon Sep 17 00:00:00 2001 From: tolulopedd26 Date: Mon, 20 Jul 2026 16:35:46 +0100 Subject: [PATCH] feat: add pytest-cov coverage threshold gate --- .github/workflows/ci.yml | 10 +++++++++- quantara/web_app/pytest.ini | 3 +++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 44cf3f802..f3f6a87b7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -93,4 +93,12 @@ jobs: - name: Run tests working-directory: ./quantara run: | - poetry run pytest web_app/tests -v --tb=short \ No newline at end of file + poetry run pytest web_app/tests -v --tb=short --cov-fail-under=80 + + - name: Upload coverage report + if: always() + uses: actions/upload-artifact@v4 + with: + name: coverage-report + path: quantara/coverage.xml + retention-days: 14 diff --git a/quantara/web_app/pytest.ini b/quantara/web_app/pytest.ini index 801a1c333..6eb9272a9 100644 --- a/quantara/web_app/pytest.ini +++ b/quantara/web_app/pytest.ini @@ -8,6 +8,9 @@ addopts = --strict-markers --tb=short -v + --cov=web_app + --cov-report=term-missing + --cov-report=xml:coverage.xml markers = integration: marks tests as integration tests (deselect with '-m "not integration"') unit: marks tests as unit tests