diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 44cf3f80..f3f6a87b 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 801a1c33..6eb9272a 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